Total Questions : 40
Expected Time : 40 Minutes

1. What is the purpose of the 'addEventListener' method in JavaScript?

2. Which method is used to join elements of an array into a string in JavaScript?

3. What is the purpose of the 'fetch' function in JavaScript?

4. Which of the following is a valid way to declare a JavaScript array?

5. How do you round the number 7.25 to the nearest integer in JavaScript?

6. How do you create a class in JavaScript?

7. How do you define a JavaScript class?

8. How do you comment a single line in JavaScript?

9. What does the 'typeof' operator do in JavaScript?

10. What is the result of the expression '2 + 2' in JavaScript?

11. What is the purpose of the 'Math.random()' function in JavaScript?

12. Which method is used to change the content of an HTML element in JavaScript?

13. What is the result of the expression '2' + 2 in JavaScript?

14. What does HTML stand for?

15. What is the purpose of 'Array.prototype.reduce()' in JavaScript?

16. What is the purpose of the 'localStorage' object in JavaScript?

17. What is the purpose of the 'map' function in JavaScript?

18. Which method is used to add a class to an HTML element in JavaScript?

19. What does CSS stand for?

20. What is the purpose of 'Array.prototype.map()' in JavaScript?

21. Which method is used to remove the last element from an array in JavaScript?

22. What is the purpose of the 'addEventListener()' method in JavaScript?

23. Which of the following is not a JavaScript data type?

24. How do you declare a function in JavaScript?

25. Which statement is used to exit a switch statement in JavaScript?

26. What is the purpose of 'JSON.stringify()' in JavaScript?

27. What is the purpose of the 'querySelector' method in JavaScript?

28. What is the purpose of 'setTimeout()' in JavaScript?

29. What is the purpose of 'console.log()' in JavaScript?

30. How do you create an object in JavaScript?

31. What is the purpose of the 'async' keyword in JavaScript?

32. What is a closure in JavaScript?

33. What is the purpose of the 'reduce' method in JavaScript?

34. Which of the following is a falsy value in JavaScript?

35. Which operator is used to concatenate strings in JavaScript?

36. Which of the following is a benefit of using JavaScript modules?

37. How do you declare a variable in JavaScript?

38. Which method is used to convert a string to uppercase in JavaScript?

39. What does the 'NaN' in JavaScript stand for?

40. What is the result of the expression '3 * '2' + 1' in JavaScript?