Understanding Javascript The Weird Part Parts |top| -
Arrow functions ( => ) solve this. They lexically bind this , meaning they inherit this from the parent scope at the time they are defined.
function Dog(name) Animal.call(this, name); understanding javascript the weird part parts
// Output: 3, 3, 3