All quizzes
Free quiz · 104 questions in the bank

JavaScript quiz

Test your JavaScript knowledge with a free interactive quiz — 104 questions with answers and explanations. No signup needed to play.

Question 1/12Score 0

What is the main difference between `for...in` and `for...of`?

In this round
  1. What is the main difference between `for...in` and `for...of`?
  2. How do you check if a variable is an array in JavaScript?
  3. What does `typeof undeclaredVar` return (when `undeclaredVar` was never declared)?
  4. What does `"hello world".includes("world")` return?
  5. Which array method creates a new array with all elements that pass a test function?
  6. What does this print? ```js const obj = {a: 1}; obj.a = 2; console.log(obj.a); ```
  7. What is the difference between `null` and `undefined` in JavaScript?
  8. What is the output of `typeof function(){}`?
  9. What is the value of `x` after `const {a: x} = {a: 1};`?
  10. Which of these correctly creates an object using shorthand property notation (ES6)?
  11. Which statement is used to handle exceptions in JavaScript?
  12. Which collects all remaining arguments into a true `Array` inside a function?
Gaps to close?
Read the curated JavaScript notes — core concepts, patterns, interview prep.
JavaScript notes

More quizzes

.NETAccessibilityAgile MethodologyAirflowAlertmanagerAlgorithms