BigInt() constructor

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

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

语法

BigInt(value);

参数

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

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

例子

BigInt(123);
// 123n

规范

Specification Status
ECMAScript (ECMA-262)
BigInt constructor
Living Standard

浏览器兼容性

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 Full support 14WebView Android Full support 67Chrome Android Full support 67Firefox Android Full support 68Opera Android Full support 48Safari iOS Full support 14Samsung Internet Android Full support 9.0nodejs Full support 10.4.0

Legend

Full support  
Full support
No support  
No support

相关链接