Quiz on JavaScript Classes



1. What keyword is used to declare a class in JavaScript?
2. Which method serves as the constructor for a class in JavaScript?
3. How do you create a new instance of a class in JavaScript?
4. Which of the following is true about class inheritance in JavaScript?
5. What is the purpose of the 'static' keyword in a class?

Advertisements