Statement
An expression is a phrase in JavaScript, and the statement is a JavaScript whole sentence or command. Use a period to end to separate statements. An expression evaluates a value, but the statement is used to execute to make something happen.
5.2 Compound statements and empty statements
Compound statement: Enclose multiple statements in curly braces to form a conforming statement.
{ x = Math.PI; CX = Math.Cos (x); ................... } First, the end of a statement block does not require a semicolon//second, and the lines in the statement block are indented
Empty statement: A statement that contains 0 statements. An empty statement is a semicolon//; the JavaScript interpreter does not perform any action when it executes an empty statement.
Bugif caused by an empty statement ((a = = 0) | | (b = = 0)); Bad! This line of code didn't do anything ... Loop does not execute o = null; This line of code always executes
Read the JavaScript authoritative guide (sixth Edition) Notes (chapter fifth)