Joined October 2012
·

Timothy Slatcher

Posted to parseInt() can be dangerous over 1 year ago

@pickachu Avoid using ~~, won't correctly parse exponential, for example:

 +"4.5e+10" = 45000000000
parseInt("4.5e+10") = 45000000000
 ~~"4.5e+10" = 2050327040
Achievements
52 Karma
0 Total ProTip Views