1. What is the correct syntax to print "Hello World" in JavaScript?
2. Which of the following is NOT a JavaScript data type?
3. How do you create a function in JavaScript?
4. What will the following code output? console.log(typeof NaN);
5. Which of these methods is used to add elements to an array in JavaScript?
6. What is the correct way to declare a constant in JavaScript?
7. Which of the following is the correct way to write an if statement in JavaScript?
8. What will the following code output? console.log(0 == '0');
9. Which event is triggered when the user clicks on a button?
10. How do you declare an array in JavaScript?
11. Which method is used to remove the last element of an array?
12. Which of these is the correct way to add an event listener in JavaScript?
13. What is the correct syntax for a while loop in JavaScript?
14. Which JavaScript function is used to parse a JSON string into a JavaScript object?
15. What is the correct way to concatenate two arrays in JavaScript?
16. Which of these is the correct way to handle asynchronous JavaScript?
17. What does the `this` keyword refer to in JavaScript?
18. How do you define a class in JavaScript?
19. What is the default value of a JavaScript variable?
20. Which method is used to change the content of an HTML element in JavaScript?
21. Which method is used to remove an element from the DOM?
22. Which operator is used to compare two values for equality without type conversion in JavaScript?
23. What will the following code output? console.log(2 + '2');
24. How can you check if an object is an array in JavaScript?
25. How do you prevent a form from submitting in JavaScript?
26. Which of the following is a false statement about JavaScript?
27. What is a promise in JavaScript?
28. What is the purpose of the `async` keyword in JavaScript?
29. Which of the following is NOT a valid variable name in JavaScript?
30. What does the `setTimeout()` function do in JavaScript?