1. Case sensitivity
Everything in ECMAScript (variables, function names, operators) is case sensitive.
For example, the variable names test and Test represent two different variables,
2. Identifier
The so-called identifier refers to the names of variables, functions, attributes, or functions parameters. One or more characters combined by the following format rules:
The first character must be a letter, underscore (_), or a dollar sign ($);
Other characters can be letters, underscores, dollar signs, or numbers.
The ECMAScript identifier is in camel case format, that is, the first letter is lowercase, and the first letter of each remaining word is uppercase, for example: firstSecond, myCar, doSomethingImport
III. Comments
ECMAScript uses C-style comments, including single-line comments and block-level comments.
Single line comment: Start with two slashes such as:
//Single line comment
Block-level comments start with a slash and an asterisk (/*) and end with an asterisk and a slash (*/) like:
/*
*This is a multi-line
*(block level) comment
*/
4. Sentences
A statement in ECMAScript ends with a semicolon; if a semicolon is omitted, the end of the statement is determined by the parser, such as:
var sum = a + b //Sentence valid even without a semicolon--------not recommended
var diff = a - b ; //Valid statement-------------Recommended
Although the ending semicolon is not necessary, it is recommended not to omit it at any time.
5. Keywords and reserved words
Keywords and reserved words: characters with specific purposes, which can be used to indicate the beginning or end of a control statement, or to perform specific operations, etc.
Keywords and reserved words: cannot be used as identifiers or attribute names.
The above is all about the basic concepts of javascript, I hope you like it.