Start learning 50% faster. Sign in now
Default parameters in ES6 enable a function to use a default value for a parameter if no argument is passed. This enhances code readability and reduces the need for conditional checks. Example: function greet(name = "Guest") { return `Hello, ${name}!`; } console.log(greet()); // Outputs: Hello, Guest! console.log(greet("Alice")); // Outputs: Hello, Alice! This feature is especially useful in scenarios where optional parameters are involved, as it simplifies function declarations. ________________________________________ Why Other Options Are Incorrect: 1. Arrow functions: Arrow functions are a concise syntax for writing functions but do not relate to parameter defaults. 2. Template literals: Template literals allow embedding expressions in strings using backticks, unrelated to parameter handling. 3. Rest parameters: Rest parameters gather multiple arguments into an array, enabling flexible argument handling but do not assign defaults. 4. Destructuring assignment: Destructuring allows unpacking values from arrays or objects but does not deal with function defaults.
The Reserve Bank has released a booklet that aims to enhance public awareness about various types of financial frauds perpetrated on gullible customers...
As per the IRACP norms given by RBI, which of the following correctly represents a Cash Credit or Overdraft account (CC/OD) as out of order ?
The Reserve Bank has released a booklet that aims to enhance public awareness about various types of financial frauds perpetrated on gullible customers...
As per Basel and subsequent RBI guidelines, Common Equity Tier 1 (CET1) capital must be at least how much percentage of risk-weighted assets (RWAs) i.e...
RBI has decided to increase the threshold limit for deposits and other extensions of funds made by non-financial Small Business Customers from ₹ 5 cr...
The place where banks’ mutual claims are settled, is called?
Which of the following Statements is/are True?
I- PCA is a framework under which banks with weak financial metrics are put under watch by the RBI...
Who has been recently appointed as an Executive Director by RBI to look after the Monetary Policy Department
RBI in its MPC meeting held on June 8th, revised Indiarsquo;s estimated GDP growth rate for FY23 to be
As per the guidelines of RBI, what is the risk weight for the housing loans with LTV Ratio (Loan to Value Ratio) lesser than 80%