JavaScript Variables and Datatypes
JavaScript Variables and Datatypes
var Name
// If we add 2...
safeInt + 2 // -> 9_007_199_254_740_992
// Binary
BigInt(0b100000000000000000000000000000000000000000000000000
000000000000000000001111111)
// -> 151115727451828646838272n
// Hexadecimal
BigInt(0xfffffffffffffffffffffffffffffffffff9fff9fffffffffffffffff)
// -> 95780971304118053647396689196894323976171195136475136n
// Octal
BigInt(0o40000000000000000000000000000000000000000011112444)
// -> 713623846352979940529142984724747568191373312n
Primitive data types
Boolean type
Boolean represents a logical entity and can
have two values: true and false.
Null type
The Null type has exactly one value: null.
Undefined type
A variable that has not been assigned a value
has the value undefined.
Primitive data types
Symbol
Symbol is a built-in object whose constructor
returns a symbol primitive — also called a
Symbol value or just a Symbol — that’s
guaranteed to be unique.