JavaScript is a programming language designed by Brendan Eich.
Type system
JavaScript has seven primitive data types: string
, number
, bigint
, boolean
, undefined
, symbol
, and null
.
In addition to these primitives, JavaScript also includes the Object type, which is used to represent more complex data structures and behaviors.
# | Data Type | Description |
---|---|---|
1 | Boolean | A data type with two possible values: true and false. |
2 | String | A sequence of characters, where even a single character is considered a string. |
3 | Number | Represents values of type double according to the IEEE 754 standard. The range of integers is limited by the maximum value of 253-1 (due to the width of the mantissa, though the reality is slightly more complex, and the same applies to the negative boundary). |
4 | Bigint | A special type for integer numeric values used when storing values larger than 253-1. |
5 | Null | A type with a single value: null. |
6 | Undefined | A JavaScript specialty (and a headache), representing an unassigned value (note: different from `null`). |
7 | Symbol | A unique identifier. |
8 | Object | Represents objects (it may seem odd at first, but functions, for example, are also considered objects). |