One: Character set
JavaScript programs are written in the Unicode character set.
Two: case-sensitive
JavaScript is a case-sensitive language, but be aware that HTML is case-insensitive
Three: spaces, line breaks, and format controls
JavaScript ignores spaces between identities in the program
Four: Unicode escape sequences
In some computer hardware and software, cannot display or input Unicode character complete, in order to support those who use the old technology of programmers, JavaScript defines a special sequence, using 6 ASCII characters to represent any 16-bit Unicode inside code.
Five: Notes
are divided into two types:
Single-line Comment
/* * * Multi-line Comment
VI: Direct Volume
The direct amount is the value that is used directly in the program.
Seven: Identifiers and reserved words
An identifier is a name. In JavaScript, identifiers are used to name variables and functions, or to use tags that do jump positions in some of the loop statements in JavaScript code
Name of the identifier:
(1) must start with a letter, an underscore (_), or a dollar sign ($)
(2) Case-sensitive
(3) cannot start with a number
Reserved words: JavaScript takes some identifiers and uses them as their own keywords. As a result, it is no longer possible to use it as an identifier in the program.
Break Delete function return typeof case do if switch var etc.
JavaScript also retains some keywords that are not available in the current version, but may be used in future versions
Class Const export extends Import super
JavaScript pre-defines a number of global variables and functions and should avoid using their names as variable and function names.
Arguments encodeURI Infinity number REGEXP Array etc.
JavaScript Learning Notes (i): lexical structure