How can I increment a numerical string by 1 in JavaScript?
var numberString = "12345612345678901234567890";
I am aiming for the output to be:
"12345612345678901234567891"
I attempted the following:
var numberString = "12345612345678901234567890";
numberString = BigInt(numberString);
var result = numberString + BigInt(1);
However, using BigInt
resulted in a value represented in scientific notation such as 1.234567896453e+25.