Home >Web Front-end >JS Tutorial >Understanding JavaScript primitive values ​​and composite values

Understanding JavaScript primitive values ​​and composite values

巴扎黑
巴扎黑Original
2016-11-25 10:14:341525browse

JavaScript data types can be divided into two types: primitive types and reference types. Primitive types are also called basic types or simple types. The basic data types of JavaScript include Undefined, Null, Boolean, Number, and String. Reference types are also called complex types, which are Object in Javascript. Correspondingly, their values ​​are also called primitive values ​​and complex values ​​respectively

Compare with Java data types:

Primitive values: the basic data types Undefined, Null, Boolean, Number and String

Composite Value: Can be composed of many different types of javascript objects



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn