JavaScript-Basics

Quiz To Test Your Basic JavaScript Knowledge

1. What is the correct way to declare a variable in JavaScript?

2. Which of the following is a valid way to comment out a single line in JavaScript?

3.What does the typeof operator do in JavaScript?

4.What is the correct syntax for an if statement in JavaScript?

5. Which of the following methods is used to add a new element to the end of an array in JavaScript?