JavaScript Advanced Programming Notes

Source: Internet
Author: User

Chapter 1-4

1. Variables
①, ECMAScript variables are loosely typed, meaning they can be used to hold any type of data. In other words, each variable is simply a placeholder for holding the value.
②, if you use var to define a variable in a function, the variable is destroyed after the function exits.
③, using typeof return for undefined and uninitialized variables is undefined
2. Data type
ECMAScript has 5 simple data types (base data types) Undefined Null Boolean number String and complex data type Object. Creating a custom type mechanism is not supported.
3. String
Features: Strings in ECMAScript are immutable, meaning that once strings are created, their values cannot be changed.
4, with (can not be used in strict mode, also does not recommend the use of more consumption of performance)
The function of the WITH statement is to set the scope of the code to a specific object.
5. Functions
Features: Named parameters are only convenient, but not necessary.
All parameter passes in ECMAScript are values and cannot pass arguments by reference.
parameter and function names cannot be eval and arguments in strict mode
6. Garbage Collection Strategy
Mark Clear
There is a circular reference to the reference count.

JavaScript Advanced Programming Notes

Related Article

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.