Block statement
A block statement is used to group zero or more statements. The block is delimited by a pair of braces (“curly braces”) and contains a list of zero or more statements and declarations.
- by Mdn Web Docs
Syntax
{
StatementList
}
StatementList
- Statements and declarations grouped within the block statement.
Example
{
const name = "Unuuuuu";
console.log(name);
}
Example Sentence
- Mdn Web docs: The block statement is often called the compound statement in other languages. It allows you to use multiple statements where JavaScript expects only one statement.