JavaScript study notes (12) simple data types and complex data types

1. Concept

Simple data types: also known as basic data types, value types

                                 如string、number、boolean、undefined、null

                                *Simple data type null, returns an empty object object

Complex data types: also known as reference types

                                Objects created by new (system objects, custom objects), such as Object, Array, Date, etc.

2. Memory allocation:

Simple data type, stored in the stack, which directly opens up a space to store values

Complex data types, first store the address in the stack, expressed in hexadecimal, and then this address points to the data in the heap

Guess you like

Origin blog.csdn.net/weixin_44400887/article/details/123998305