minus-squaredanda@lemmy.ziptoProgrammer Humor@programming.dev•parseInt(5)linkfedilinkarrow-up100·1 day agoIt’s because parseInt is expecting a string, so the decimal gets converted to a string, and 0.0000005.toString() returns 5e-7. linkfedilink
minus-squaredanda@lemmy.ziptoGames@sh.itjust.works•A Minecraft Movie breaks records to become highest opening video game movie of all timelinkfedilinkEnglisharrow-up4arrow-down4·28 days agoDon’t listen to the haters it was really good linkfedilink
It’s because parseInt is expecting a string, so the decimal gets converted to a string, and
0.0000005.toString()
returns5e-7
.