Appendix B. Built-in Functions
This appendix contains a list of the built-in functions (methods of the global object), discussed in Chapter 3, Functions.
|
Function |
Description |
|---|---|
|
|
Takes two parameters: an input object and radix; then tries to return an integer representation of the input. Doesn't handle exponents in the input. The default radix is > parseInt('10e+3');
10
> parseInt('FF');
NaN
> parseInt('FF', 16);
255
|
|
|
Takes a parameter and tries to return a floating-point number representation of it. Understands exponents in the input. > parseFloat('10e+3');
10000
> parseFloat('123.456test');
123.456
|
|
|
Abbreviated from "Is Not a Number". Accepts a parameter and returns |