aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • JavaScript and J2EE Web Technologies
  • To what value will the following expressions evaluate in ...
Multiple choice technology web technology

To what value will the following expressions evaluate in the JavaScript console? 011 * 2

  1. 022

  2. 18

  3. 9

  4. None of the above

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

In JavaScript, numbers with leading zeros are interpreted as octal, so 011 is 9 in decimal, and 9 * 2 equals 18. This demonstrates JavaScript's octal literal parsing.

Keep practicing — related questions

  • To what value will the following expressions evaluate in the JavaScript console? a = 4; b = 6; a+++b;
  • what value will the following expressions evaluate in the JavaScript console? "6" + "5" * 2
  • To what value will the following expressions evaluate in the JavaScript console? "abc"[2]
  • To what value will the following expressions evaluate in the JavaScript console?5 + true
  • To what value will the following expressions evaluate in the JavaScript console? "\u0061"
  • To what value will the following expressions evaluate in the JavaScript console? typeof 1/0
  • To what value will the following expressions evaluate in the JavaScript console? (16).toString(16)
  • To what value will the following expressions evaluate in the JavaScript console? null == undefined
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy