Home > Article > Web Front-end > Detailed explanation of js composition and naming conventions
1. The composition of js
1. js:javascript is a lightweight script programming language
2. ECMAScript is between 4 and 5 Between versions: defines the core things such as naming conventions, variables, data types, basic syntax, and operation statements in js.
3. DOM: document object model document object model
4. BOM: browser object model browser object model
2. Naming convention
1. Strictly case-sensitive test in js Test
2. Use camel case naming method
1) The first letter is lowercase, and the first letter of each meaningful word in the rest is Capital letters
2) You can use numbers, letters, underscores, and $ to name (numbers cannot be the first number)
3. You cannot use keywords and reserved words (There is no need to remember them all, But when it comes up, you should know that interview questions from large companies may come up with a question like this )
Keywords: words with special meaning in js
Reserved words: For
that may become keywords in the future, please refer to the table below
The above is the detailed content of Detailed explanation of js composition and naming conventions. For more information, please follow other related articles on the PHP Chinese website!