DEV Community

Discussion on: ES2020: Summary of new features & examples πŸ”₯

Collapse
 
qm3ster profile image
Mihail Malo • Edited

creating a BigInt object: const value = new BigInt(500)

That's the same as new String() and new Number(), in the sense that people shouldn't do this.
The example below correctly does const value = BigInt(maxInteger), a conversion call like Boolean(Number('0')).
But the description uses new, pls fix.

Collapse
 
olivierloverde profile image
Olivier

Good catch ! You are correct, we should not use new with BigInt. I've updated the article accordingly. Thank you!