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/5Score 0

What does `Object.values({a: 1, b: 2})` return?

Questions in this quiz
  1. What does `Object.values({a: 1, b: 2})` return?
  2. What does `extends` do in a class declaration?
  3. Which method removes the last element from an array and returns it?
  4. What does this print? ```js const obj = {a: 1}; obj.a = 2; console.log(obj.a); ```
  5. Which method converts a JSON string into a JavaScript object?
  6. What is the value of `x` after `const {a: x} = {a: 1};`?
  7. Which creates a shallow copy of an array `arr`?
  8. What is a closure in JavaScript?
  9. Which statement is used to handle exceptions in JavaScript?
  10. What does `typeof undeclaredVar` return (when `undeclaredVar` was never declared)?
  11. What is the purpose of `Array.prototype.map()`?
  12. What will `console.log(1 + "2")` output?
Gaps to close?
Read the curated JavaScript notes — core concepts, patterns, interview prep.
JavaScript notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web