minus-squaredanda@lemmy.ziptoProgrammer Humor@programming.dev•parseInt(5)linkfedilinkarrow-up100·8 days 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.ziptoGaming@lemmy.zip•Fallout: London, the impressive Fallout 4 mod that’s basically a whole new game, has a release datelinkfedilinkEnglisharrow-up23·1 year agoApril 24th linkfedilink
It’s because parseInt is expecting a string, so the decimal gets converted to a string, and
0.0000005.toString()
returns5e-7
.