Sorting, Symbols & Timing

Preview — 3 of 8 questions

What is the output?

javascript
console.log(String.prototype.trimLeft.name === 'trimLeft');
console.log(String.prototype.trimLeft.name === 'trimStart');
Atrue then false
Bfalse then true
Ctrue then true
Dfalse then false

What is the output?

javascript
const numbers = new Set([1, 1, 2, 3, 4]);
console.log(numbers.size);

const letters = new Set('Firefox');
console.log(letters.size);
A5 then 7
B4 then 7
C4 then 6
D5 then 6

What is the output?

javascript
try {
  const sym = new Symbol('id');
  console.log(sym);
} catch (e) {
  console.log(e.constructor.name);
}
ATypeError
BSyntaxError
CSymbol(id)
DReferenceError

Sign up free to play

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