JS study notes (b) operation

Label statement:

In JavaScript, any statements can add a tag, the program jumps to set paths in a complex structure.

Syntax: label: statements statements ---- Statement List

 

Label label is any legal identifier, but you can not use a reserved word.

A tag name variable name may duplicate names

A tag name tag attribute names belong to the category, must be unique;

 

After the break keyword can be followed by a label name to indicate the program to jump to the termination position. Syntax: break label;

 

break statement statements and label bound to use only the inner nested structure.

 

Computing performance:

1. The look-up table method can eliminate all conditional,

2. FIELD logical mapping table method for forming a key and a value

3.switch apply to each key needs a unique action or series of actions occasions.

 

Guess you like

Origin www.cnblogs.com/minnong/p/11284626.html