Learn JavaScript

Lesson 6 of 9 ¡ this, Prototypes and Classes

Module 9 ¡ this, Prototypes and Classes

The Interview Pack: this Puzzles, bind by Hand, Mixins and a Bug Gallery

ProReading

Every JavaScript interview has a this question, and most have a prototype question too. They look like trick questions, but each one is a plain application of a rule from Lessons 01 and 02. The skill is to spot which call form you are looking at, quickly and calmly.

Checking what this lesson needs for youâ€Ļ

What is inside The Interview Pack: this Puzzles, bind by Hand, Mixins and a Bug Gallery

  1. Pattern 1: six this puzzles
  2. Pattern 2: bind by hand
  3. Pattern 3: prototypal against classical inheritance
  4. Pattern 4: mixins
  5. Six interview questions