BigInt() constructor

翻译不完整。 请帮助我们翻译这篇文章!

 BigInt() 构造函数用来创建 BigInt 对象。

语法

BigInt(value);

参数

value
被创建的对象的数值。 可以是字符串或整数。

Note: BigInt() 不与 new 运算符一起使用。

例子

BigInt(123);
// 123n

规范

Specification Status
ECMAScript Latest Draft (ECMA-262)
BigInt constructor
Draft

浏览器兼容性

Update compatibility data on GitHub
DesktopMobileServer
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternetNode.js
BigIntChrome Full support 67Edge No support NoFirefox 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

相关链接