Loading topic
this keyword. Here you will learn what the constructor method does and what happens, step by step, when you write new.2 min readthis. It also assumes you know how template literals work and how to call a method on an object.2 min readlet and const do, and how a class compiles down to a constructor function plus a prototype (covered in the previous chapter). A class is a function, but it does not behave like a function declaration in three ways: its bod2 min readthis inside a constructor.2 min readClassName.prototype. A static member belongs to the class itself, not to its instances. Use one for data or behavior that relates to the class as a whole: factory f2 min readthis is set by how a function is called. It covers why class methods lose this when you pass them around, and three ways to fix it.2 min readprototype object. Here you will use extends to build one class on top of another.2 min readextends and how methods live on the prototype. The super keyword lets a subclass reach its parent class in two ways. You call super(...) to run the parent constructor, and you use super.method() to call a parent method.2 min readextends links a subclass to its parent and that every object has a prototype you can read with Object.getPrototypeOf. Here you will see how instanceof uses that link, where it gives misleading answers, and what to use in those cases.2 min readextends creates a subclass and how super() calls the parent constructor. Here you apply both to classes the language provides, mainly Error and Array.2 min readextends and super() work. It also assumes you can write a constructor and throw errors.2 min readextends, and super from earlier chapters, and that you are comfortable with arrow functions.2 min read