Chapter 13
Classes
Whatclass adds over constructor functions: fields, private names, static blocks, super, and subclassing built-ins.7 questions
- 010Are classes just syntactic sugar over prototypes?Coming soonCoremedium
- 020How do private fields (
#x) work?Coming soonmedium - 030Class fields vs methods — where does each live?Coming soonmedium
- 040What are static members and static initialization blocks?Coming sooneasy
- 050How does
superwork?Coming soonhard - 060How do you extend built-ins like
ArrayandError?Coming soonhard - 070Composition vs inheritance — when do mixins make sense?Coming soonmedium