Multiple choice technology web technology

HTML: javascript: alert(parseInt(name.value)); What is The Output When The User Enters 0XAB in the text field ?

  1. 171

  2. NaN

  3. Error On Page

  4. 0

  5. ab

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

parseInt() without a radix interprets '0XAB' as hexadecimal due to the 0X prefix. Hexadecimal AB equals decimal 171 (10*16 + 11 = 171). The prefix is a valid radix indicator.