JavaScript Tutorial menu

JavaScript Quiz

Check what you have learned in this tutorial. Answer each question, then read the explanation.

How to Use This Quiz

  • There are 10 questions, covering the whole tutorial
  • Pick one answer for each question
  • If you get one wrong, go back to that lesson and try its examples again

Questions

Exercise

1. Which keyword creates a variable that cannot be reassigned?

Exercise

2. What does console.log("3" + 4) show?

Exercise

3. Which comparison checks both value and type?

Exercise

4. What is the index of the first item in a JavaScript array?

Exercise

5. Which array method returns a new array containing only the items that pass a test?

Exercise

6. What does this function return? const area = (w, h) => w * h; area(4, 5)

Exercise

7. Which value is falsy in JavaScript?

Exercise

8. Which line changes the text of the element with id="title"?

Exercise

9. What does JSON.stringify({ a: 1 }) return?

Exercise

10. In what order are the messages shown? console.log("A"); setTimeout(() => console.log("B"), 0); console.log("C");

What Next?

Well done for finishing the JavaScript tutorial. Next, try TypeScript to add types to your JavaScript, or jQuery to see a classic library built on it.

Want to build real projects with a teacher? Join the Workownix Web Development course, online or at our institute in Orangi Town, Karachi.

Learn JavaScript with a teacher

Join the Web Development course at Workownix, online or in Orangi Town, Karachi, and get a certificate.

See the course Ask on WhatsApp