Home  >  Article  >  Web Front-end  >  Detailed explanation of js composition and naming conventions

Detailed explanation of js composition and naming conventions

零下一度
零下一度Original
2017-06-25 09:10:581799browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn