BigInt() constructor
BigInt()
构造函数用来创建 BigInt
对象。
语法
BigInt(value);
参数
value
-
被创建的对象的数值。可以是字符串或整数。
备注: BigInt()
不与 new
运算符一起使用。
示例
js
BigInt(123);
// 123n
规范
Specification |
---|
ECMAScript Language Specification # sec-bigint-constructor |
浏览器兼容性
BCD tables only load in the browser
相关链接
BigInt
class