Use-Cases of this tutorial
// Developer can read this number incorrectly and this may lead to bugs var n = 2565648775657678;
// difficult to read let a = BigInt(99999999999999999999);
These separators can be used in appropriate places, for example, digits can be grouped per thousand.
// This is much easier to read var n = 2_565_648_775_657_678;
let a = BigInt(99_999_999_999_999_999_999);
Obviously numeric separators are just for code readability, and will not change the value of the number.
Usage of numeric separators are bound to some limitations :
Multiple underscores cannot be included one after the other.
// not allowed var a = 4554__88978_6;
Underscore cannot be included at the end of the number.
// not allowed var a = 1111111111111111_;
Underscores cannot be included after a leading 0.
// not allowed var a = 0_333333333333;