unexpected output in javascript when converting string to number

Viewed 343

In MDN in this example on parseInt method

console.log(parseInt(4.7 * 1e22, 10)); // Very large number becomes 4
console.log(parseInt(4.7 * 1e20, 10)); //result is 470000000000000000000

or small number than 20 it give me expected result what is reason for this ?

2 Answers
Related