JS Beginner Entry

Source: Internet
Author: User

JavaScript data type (symbol)
One, the original data type or basic data type 6 kinds

1,undefined (1, Declaration unassigned, 2, function has no return value)
2,null (empty, not present)
3,number (Numbers, decimals, and integers)
4,boolean (boolean value, True,false)
5,string (string, single or double-cited)
The 6,ES6 symbol primitive data type produces a unique value through the symbol (), which can be used to transmit the parameter symbol (' DD '), the String class, which does not affect its value, as a property value
This was a mistake originally implemented by JavaScript, which was later ECMAScript. Today we can explain that NULL is a placeholder for an object that does not exist, but it is important to be aware of this feature when actually coding
ECMAScript that undefined are derived from null, so they are defined as equal. But what if, in some cases, we must differentiate between these two values? You can use the following two methods.

II. reference data types or complex data types
The 1,object object object is an unordered set of properties, where the "properties" can be basic values, objects, or functions
2,array Array
3,function function
5,object is the parent of all reference types


Differences between the original data type and the reference data type:

Raw data type
1, simple data segment
2, stored value (stack)

Reference data type
1, there are multiple values that make up an object
2, store the address (heap)

JS Beginner Entry

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.