®参考文档: JavaScript reference (like:Statements Block ...)

发布时间 2023-06-06 13:17:36作者: zno2

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference

 

A block statement (or compound statement in other languages) is used to group zero or more statements. The block is delimited by a pair of curly brackets and may optionally be labelled:

Syntax

[label:] {
  statement_1;
  statement_2;
  ...
  statement_n;
}
statement_1statement_2statement_n
Statements grouped within the block statement.
label
An optional label for visual identification or as a target for break.