mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 18:32:22 +00:00
docs(proposals): edit BigInt
This commit is contained in:
parent
99b39cc230
commit
eebbf77f99
@ -694,12 +694,15 @@ BigInt(1.5) // RangeError
|
||||
BigInt('1.5') // SyntaxError
|
||||
```
|
||||
|
||||
BigInt 对象继承了 Object 提供的实例方法。
|
||||
BigInt 对象继承了 Object 对象的两个实例方法。
|
||||
|
||||
- `BigInt.prototype.toLocaleString()`
|
||||
- `BigInt.prototype.toString()`
|
||||
- `BigInt.prototype.valueOf()`
|
||||
|
||||
它还继承了 Number 对象的一个实例方法。
|
||||
|
||||
- `BigInt.prototype.toLocaleString()`
|
||||
|
||||
此外,还提供了三个静态方法。
|
||||
|
||||
- `BigInt.asUintN(width, BigInt)`: 给定的 BigInt 转为 0 到 2<sup>width</sup> - 1 之间对应的值。
|
||||
|
Loading…
x
Reference in New Issue
Block a user