is nodejs cheating when comparing to big numbers?

25 Views Asked by At

When comparing the two values in node js the console is logging out that both value are equal when they are not.

let num = 9999999999999999999999999999999999;
if (num === 9999999999999999992999999999999999) {
        console.log("its equal");
}

console.log(num.toString(36)); //its equal

why is that?

0

There are 0 best solutions below