Output Basics

Preview — 3 of 10 questions

What is the output of this code?

javascript
console.log(x);
var x = 5;
console.log(x);
AReferenceError then 5
Bundefined then 5
C5 then 5
Dnull then 5

What does this expression evaluate to?

javascript
console.log(typeof null);
A"null"
B"undefined"
C"object"
D"boolean"

What is logged to the console?

javascript
console.log(1 + "2" + 3);
A6
B"123"
C"15"
DNaN

Sign up free to play

Answer all 10 questions (7 more), see explanations for every answer, and track your score.