DEV Community

Discussion on: What is the most confusing 💡thing in JavaScript?

Collapse
 
math2001 profile image
Mathieu PATUREL

It is true. Just tested it myself:

JavaScript parseInt.

Paste this in the console and see it for yourself:

console.log(parseInt(0.000001))
console.log(parseInt(0.0000001))
console.log(parseInt(0.000006))
console.log(parseInt(0.0000006))