benvzq
Last Updated: February 25, 2016
·
2.358K
· amsul

Shorthand to parse string to int or float

parseFloat( "1.032323" ) // result: 1.032323
parseInt( "1.032323", 10 ) // result: 1

Or

+"1.032323" // result: 1.032323
~~"1.032323" // result: 1