Back to programming Quizzes

JavaScript Quiz (Advanced)

This JavaScript Advanced Quiz is designed for experienced developers preparing for tough interviews. It covers closures, scope, prototypes, async behavior, event loop basics, performance, and tricky JavaScript edge cases.

15
Questions
~10
Minutes
10
Min Limit

Try a few sample questions

The question bank contains 48 questions. Your scored round uses up to 15 different questions. These samples are excluded from your round; try each one before opening its answer and explanation.

1. What is a closure in JavaScript?

  1. A function with no name
  2. A function bundled with its lexical scope
  3. A block scope variable
  4. A callback function
Reveal sample answer and explanation

Answer: A function bundled with its lexical scope

Closures allow functions to access variables from their lexical scope.

2. Which keyword creates block-scoped variables?

  1. var
  2. global
  3. let
  4. static
Reveal sample answer and explanation

Answer: let

let creates block-scoped variables.

3. What will typeof undefined return?

  1. null
  2. undefined
  3. object
  4. string
Reveal sample answer and explanation

Answer: undefined

typeof undefined returns 'undefined'.