JavaScript (ii) Basic concepts

Source: Internet
Author: User

JS Case-sensitive

  Label selectors are case-insensitive in HTML/CSS

  ID class selector is case sensitive

where property Name Property Name property value is not case sensitive

  the case-insensitive content part of the inline event onclick, etc.

More than one of the same inline events will be flushed out of the back

identifiers (variables, functions, names of properties)

Naming method: The first character must be a letter , an underscore , or a

Comment Method

  Single-line comment//

Paragraph comment/* * *

Strict mode

"Use strict"//Add to first line

Statement

ECMAScript in the statement; End

  If you do not end with a semicolon, the compiler automatically resolves to see if the following code can be executed with him if possible merge if not, add a semicolon after this line

  Return break automatically add a semicolon regardless of whether it can be executed with the following line

Continue to be executed after the change of line

+ +--on the contrary because he is a unary operator right-associative  

The variable Ecmascript variable is loosely typed  

Declaring variable var

VAR declared variable will be in advance var variable cannot be deleted because Var is equivalent to applying for a space

A global variable that is generated without a declaration can be deleted because he is the equivalent of adding a property to the Window object

Because the properties of an object are unordered, there is no need to advance so the variables generated in this way do not advance

Small problem

  

var a="ABCD",    a.len=4//undefined

Here is the wrapper class only object has method other just wrapper class

JavaScript (ii) Basic concepts

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.