BigInt() constructor

The BigInt() constructor is used to create BigInt objects.

Syntax

BigInt(value);

Parameters

value
The numeric value of the object being created. May be a string or an integer.

Note: BigInt() is not used with the new operator.

Examples

BigInt(123);
// 123n

Specifications

Specification Status
ECMAScript Latest Draft (ECMA-262)
The definition of 'BigInt constructor' in that specification.
Draft

Browser compatibility

No compatibility data found. Please contribute data for "javascript.builtins.BigInt.BigInt" (depth: 1) to the MDN compatibility data repository.

See also