1. JavaScript is case sensitive, but HTML is not case sensitive
2, JS will ignore the space between the logo, in most cases will also ignore the newline character, so to use
Neat, Consistent coding style
3,//As the end of the comment,/* and/* can be used as a cross-line comment, but cannot have nested note
Release
4. The identifier must start with a letter, underscore, or dollar sign (the number is not allowed as the first word
character), subsequent characters can include the number
For convenience, we generally use ASCII letters and numbers to denote
5, for the semicolon ";" If a statement is an exclusive line, you can not add a semicolon after the
Note: It is not necessary to add a semicolon to each line, and JS fills the semicolon only if the code is missing a semicolon and cannot be parsed correctly.
At some point, you must manually add a semicolon, such as:
For the sake of conservatism, you can also add a semicolon in front of the statement so that if the semicolon of the previous sentence is deleted by mistake, it can be parsed correctly.
6, * if it involves a return, break, continue statement in the scene, if the three keywords followed by a newline, JS will fill the semicolon at the line.
* When it comes to the "+ +" and "--" operators, if they are prefixed, they should be on the same line as the expression, or the end of the line will fill the semicolon
Learn the second chapter of the JavaScript authoritative guide