?
What will happen if the radix parameter of the parseInt() function is omitted?
Answer & Solution
Correct Answer:
Option
A
If the radix parameter is omitted, JavaScript assumes the following:
1. If the string begins with “0x”, the radix is 16 (hexadecimal)
2. If the string begins with “0”, the radix is 8 (octal). This feature is deprecated
3. If the string begins with any other value, the radix is 10 (decimal)
1. If the string begins with “0x”, the radix is 16 (hexadecimal)
2. If the string begins with “0”, the radix is 8 (octal). This feature is deprecated
3. If the string begins with any other value, the radix is 10 (decimal)
Join the Discussion
Login to post a comment or share your explanation.
Login