1var myInt = parseInt("10.256"); //10
2var myFloat = parseFloat("10.256"); //10.256
1Number("3.14") // returns 3.14
2false.toString() // returns "false"
3String(false) // returns "false"
1var text = '3.14someRandomStuff';
2var pointNum = parseFloat(text);
3// returns 3.14
4
1var x = parseInt("1000", 10); // you want to use radix 10
2 // so you get a decimal number even with a leading 0 and an old browser ([IE8, Firefox 20, Chrome 22 and older][1])