← All topics
Quiz: Classes, Modules, Map and Set: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. What does this print? (code)
- Q2. What does this print? (code)
- Q3. What does this print? (code)
- Q4. What is special about a field written as balance inside a class?
- Q5. Where does a static method live?
- Q6. In a child class constructor, what must happen before you use this?
- Q7. Which import matches export default function formatRupees() {} in price.js?
- Q8. Which line is CommonJS rather than an ES module?
- Q9. When is a Map a better choice than a plain object?
- Q10. What is typeof a class in JavaScript?