JavaScript: What's the output - Statistics

General Stats
  • This quiz has been taken 402 times
  • The average score is 4 of 15
Answer Stats
Question Answer % Correct
const x = 1n;
console.log(x + 1);
Uncaught TypeError
43%
let x = 1;
console.log(x++);
1
39%
console.log(![]); false
39%
console.log(0 || 5); 5
37%
console.log(-1 / 0); -Infinity
36%
console.log(011); 9
34%
const x = "x" - 1;
const y = "y" - 1;
console.log(x == y);
false
31%
console.log(! 5 < 6); true
28%
const x = {
a: 1,
a: 2
};
console.log( JSON.stringify(x) );
{"a":2}
22%
console.log("" + Array(10)); ,,,,,,,,,
18%
console.log(5 - 3 + "e2" - 1); 199
15%
let x = 3, y = 5;
console.log(x ^ y);
6
15%
let s = "";
for (let i = 5; i--, i > 0; )
s += i;
console.log(s);
4321
9%
let s = "";
for (const i in [0,0,0])
s += 1 + i;
console.log(s);
101112
7%
// WARNING: hard
let s = "";
for (let i = 5, j = 0, r = 1; j += r *= j < i || -1;)
s += j;
console.log(s);
123454321
6%
No matching quizzes found
Score Distribution
Percent of People with Each Score
Percentile by Number Answered
Your Score History
You have not taken this quiz