5.3.1 The parseInt() Method
This method converts a string to a number. It starts parsing at the beginning of the string and returns all integers until it reaches a non-integer and then stops parsing. If the string doesn't begin with an integer, NaN  (not a number) is returned. For example, parseInt("150cats") becomes 150 , whereas parseInt("cats") becomes NaN . You can also use octal and hexadecimal numbers. In the two-argument format, the first argument to parseInt() is a string containing a number base (radix) ranging from 2 to 36. The default is base 10. In the statement, parseInt("17", 8) , the result is 15 . The first argument is the string to be parsed and the second argument, 8, is the number base of the number (here, octal 17). The value returned is decimal 15 . Refer to Tables 5.14 and 5.15.
parseInt(String, NumberBase); Default base is 10 parseInt(String);
parseInt("111", 2); 7 ( 111 in base 2 is 7) parseInt("45days"); 45
Table 5.14. parseInt(String).
Table 5.15. parseInt(String, NumberBase).
5.3.2 The parseFloat() Method
The parseFloat() method is just like the parseInt() method except that it returns a floating-point number. A floating-point  number is a number that contains a fractional part, such as 3.0, “22.5, or .15. The decimal point is allowed in the string being parsed. If the string being parsed does not start with a number, NaN (not a number) is returned.
Table 5.16. parseFloat(String).
5.3.3 The eval() Method
eval("(5+4) / 3");