Reputation: 121
So if I do 712569312664357328695151392 + 8100824045303269669937
I want the result to be:
712577413488402631964821329
But instead I have
7.125774134884027e+26
Upvotes: 3
Views: 5133
Reputation: 81
let a = 712569312664357328695151392;
let b = 8100824045303269669937;
(BigInt(a) + BigInt(b)).toString()
will give you your expected result.
Upvotes: 2