What is the function of the parseInt() method?
A
Parses a data type and stores in an integer
B
Parses a string and returns an integer
C
Parses an integer and returns a string
D
Parses a string and return an object
Correct Answer: Parses a string and returns an integer
The function parseInt() method parses a string and returns an integer. If the string begins with 0x, then the radix value will be 16. If the string begins with “0”, the radix is 8 (octal).