BigInt
JS · Numbers & Mathsyntax
const big = 123n;
const big = BigInt(value);example
const huge = 9007199254740993n;
console.log(huge + 1n); // 9007199254740994n
console.log(huge * 2n); // 18014398509481986n
// Convert between types
console.log(Number(100n)); // 100
console.log(BigInt(42)); // 42nNote Cannot mix BigInt and Number in arithmetic (throws TypeError). Convert one type first. No Math methods work with BigInt.