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
ECMAScript Latest Draft (ECMA-262)
The definition of 'BigInt constructor' in that specification.

Browser compatibility

Update compatibility data on GitHub
DesktopMobileServer
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternetNode.js
BigInt() constructorChrome Full support 67Edge Full support 79Firefox Full support 68IE No support NoOpera Full support 54Safari No support NoWebView Android Full support 67Chrome Android Full support 67Firefox Android Full support 68Opera Android Full support 48Safari iOS No support NoSamsung Internet Android Full support 9.0nodejs Full support 10.4.0

Legend

Full support  
Full support
No support  
No support

See also