A
Q. What is block statement in JavaScript?
- Correct Answer - Option(A)
- Views: 9
- Filed under category JavaScript
- Hashtags:
A
A block statement (or compound statement) in JavaScript is used to group multiple statements together within curly braces {}. It is typically used in control structures like if, for, while, and function definitions.
Example of a Block Statement:
{
let a = 10;
let b = 20;
console.log(a + b); // 30
}
Why Not Other Options?
You must be Logged in to update hint/solution
Be the first to start discuss.
Discusssion
Login to discuss.