Understanding Javascript The Weird Part Parts
Fix: use arrow functions (lexical this ) or .bind() .
Every object has a prototype property that points to another object. If you try to access a property on an object and it isn't there, JavaScript looks at the prototype. If it’s not there, it looks at the prototype’s prototype. This is the . Even though modern JavaScript uses the class keyword, it is actually just "syntactic sugar" over this prototype system. Why the "Weird Parts" Matter understanding javascript the weird part parts