Back to programming Quizzes

JavaScript Quiz (Intermediate)

This JavaScript Intermediate Quiz is designed for developers who already understand the basics and want to test real-world JavaScript concepts. It covers arrays, objects, functions, scope, DOM manipulation, async behavior, and interview-relevant logic.

15
Questions
~10
Minutes
10
Min Limit

Try a few sample questions

The question bank contains 49 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 the scope of a variable declared using let?

  1. Global scope
  2. Function scope
  3. Block scope
  4. Module scope
Reveal sample answer and explanation

Answer: Block scope

Variables declared with let are block-scoped.

2. Which array method returns a new array without modifying the original?

  1. splice()
  2. slice()
  3. push()
  4. pop()
Reveal sample answer and explanation

Answer: slice()

slice() returns a shallow copy of an array.

3. What will typeof NaN return?

  1. NaN
  2. undefined
  3. number
  4. object
Reveal sample answer and explanation

Answer: number

NaN is considered a number type in JavaScript.