1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-27 20:32:21 +00:00

修改错误

书写错误,BigInt写成了BitInt
This commit is contained in:
CosSalt 2018-08-22 01:10:13 +08:00 committed by GitHub
parent ba5ed7aed8
commit 14704db399
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -570,11 +570,11 @@ JavaScript 原生提供`BigInt`对象,可以用作构造函数生成 BitInt
```javascript
BigInt(123) // 123n
BigInt('123') // 123n
BitInt(false) // 0n
BitInt(true) // 1n
BigInt(false) // 0n
BigInt(true) // 1n
```
`BitInt`构造函数必须有参数,而且参数必须可以正常转为数值,下面的用法都会报错。
`BigInt`构造函数必须有参数,而且参数必须可以正常转为数值,下面的用法都会报错。
```javascript
new BitInt() // TypeError