One, case sensitive
Everything in ECMAScript (variables, function names, operators) is case-sensitive.
If the variable name test and test represent two different variables,
Second, identifiers
An identifier is the name of a variable, function, attribute, or the parameter of a function. An identifier is one or more characters grouped by the following formatting rules:
The first character must be a letter, an underscore (_), or a dollar sign ($);
Other characters can be letters, underscores, dollar signs, or numbers.
The ECMAScript identifier is in the Camel case format, which is the first letter lowercase, and the remainder of the first letter of the word is capitalized, for example: Firstsecond,mycar,dosomethingimport
Third, note
ECMAScript uses C-style annotations, including single-line comments and block-level annotations.
Single-line Comment: Starts with a two slash:
Single-line Comment
Block-level comments begin with a slash and an asterisk (/*), ending with an asterisk and a slash (* *) such as:
/*
* This is a multiline
* (Block level) Note
*/
Iv. statements
The statement in ECMAScript ends with a semicolon, and if the semicolon is omitted, the parser determines the end of the statement, such as:
var sum = a + b//Even without a semicolon is a valid statement-------not recommended
var diff = A-b; Valid statements---------recommended
Although the semicolon at the end is not required, it is recommended that you do not omit it at any time.
V. Keywords and reserved words
Keywords and reserved words: characters that have a specific purpose that can be used to indicate the beginning or end of a control statement, or to perform a specific operation, and so on.
Keywords and reserved words: cannot be an identifier or a property name.
The above is all about the basic concept of JavaScript, I hope you can enjoy it.