Open this example in the interactive library
Source code
const large = 9007199254740993n;
console.log(String(large + 2n));
Sample output
9007199254740995

Work with large integers. A self-contained example using the JavaScript runtime.
Open this example in the interactive library
const large = 9007199254740993n;
console.log(String(large + 2n));
9007199254740995