JavaScript Classes and Prototypes Quiz
JavaScript classes are built on prototypes. Objects look up missing properties on their prototype chain, and a class is really a special kind of function.
These questions cover the prototype chain, static, getters, private fields and constructor behavior.
Classes & Prototypes questions
- Why does this become undefined when you extract a method?
- What happens when a constructor returns an object?
- Do objects see prototype changes made after they're created?
- Are JavaScript classes hoisted?
- Can you call a static method on a class instance?
- What is the difference between in and hasOwnProperty?
- What is typeof a class in JavaScript?
- What happens when you assign to a getter-only property?