Type definitions

The availability of types very much depends on the control and operation in use. See the introduction to the basic concepts for more.


A sequence of characters used to represent text.

Example: Hello, World.

In JavaScript text values are represented by string primitives.


A sequence of bytes consisting of eight bits (0 or 1) each.

Example: 63 69 70 68 65 72 65 64 69 74 6f 72 (hex representation)

In JavaScript bytes values are represented by ArrayBuffer objects.


A floating-point number or a very large/small integer number.

Example: 1.337

In JavaScript number values are represented by number primitives where Number.isSafeInteger and isNaN evaluate to false. The latter rely on the IEEE 754 double-precision 64-bit floating point format.

Note that the precision of this data format is limited and thus floating point numbers and integers may be rounded to the nearest representable number. See Why don’t my numbers add up? to go down this rabbit hole.


A signed integer value between 253=9,007,199,254,740,992–2^{53}=-9,007,199,254,740,992 and 253=9,007,199,254,740,9922^{53}=9,007,199,254,740,992 (exclusive).

Example: 1337

In JavaScript integer values are represented by “safe integer” number primitives where Number.isSafeInteger evaluates to true. Safe integers can be exactly represented in memory without losing precision.


A logical data type that can have only the values true or false.

Example: true

In JavaScript boolean values are represented by boolean primitives.