The basic data types in es6 include six types: "Number", "String", "Boolean", "Symbol", "null" and "undefined": 1., including integers and floating point numbers, used for Represents a numerical value; 2. String, used to represent text data; 3. Boolean, represents logical true or false; 4. Symbol, used as a unique identifier for object attributes; 5. null, represents a null value or non-existence Object; 6. undefined.
# Operating system for this tutorial: Windows 10 system, Dell G3 computer.
In ES6 (ECMAScript 2015), the basic data types have not changed from previous versions, and still include the following types:
Number (Number): including integers and floating point numbers, used to represent numerical values, such as: 42, 3.14.
String: used to represent text data, such as: "Hello, World!".
Boolean value (Boolean): represents logical truth or falsehood, that is, true or false.
Symbol: A new data type in ES6 that represents a unique value and is used as a unique identifier for object attributes.
In addition, a new basic data type was introduced in ES6:
In addition, there is a special basic data type:
These basic data types are still the most basic and commonly used data types in JavaScript in ES6. They are used to store and process various data and are the basic building blocks of the JavaScript language.
The above is the detailed content of What are the basic data types in es6. For more information, please follow other related articles on the PHP Chinese website!