JS Data classification

Source: Internet
Author: User

Data classification of JS

Differences between raw data types and reference data types

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)

6 Types of raw data type or basic data type
1,null (empty, not present)
2,undefined (1, Declaration unassigned, 2, function has no return value)
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


Reference data type or complex data type
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

4,object is the parent of all reference types

Detection data type
typeof

JS Data classification

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.