https://repl.it/@Khalid_Williams/Classrooms-totalCapacity
https://repl.it/@Khalid_Williams/Clubs-membersBelongingToClubs
https://repl.it/@Khalid_Williams/Cakes-groceryList
https://repl.it/@Khalid_Williams/Bosses-bossLoyalty
https://repl.it/@Khalid_Williams/Classrooms-studentsPerInstructor
https://repl.it/@Khalid_Williams/Classrooms-modulesPerInstructor
https://repl.it/@Khalid_Williams/Stars-in-Constellations
https://repl.it/@Khalid_Williams/Scope-1
EXERCISE I:
- D - strawberry
- C - mango
- B - mango
- A - apple
EXERCISE II:
- C - Spot
- D - Spot
- E - Biscuit
- B - Biscuit
- A - Biscuit
EXERCISE III:
- D - Robbie
- B - Mr. Robbie
- C - Bobo
- E - McJaeger
- A - McJaeger
EXERCISE IV:
- C - Travis
- D - Travis
- B - Khalid
- A - Khalid
EXERCISE V:
- A - Spot
- B - Spot
- C - Biscut
- D - Biscut
- E - Biscut
EXERCISE VI:
- A Rody
- B RodyToy
- C Tesla
- D RodyToyDaniels
https://repl.it/@jsfun/Context
We do not lose the value of this in our anonymous callback function due to the reassignment of this to _this on Line 6. The original context of this refers to dog since it is invoked as a method on an object.
Normally, invoking a method on an object will make this refer to the parent object. We lose the value of this due to our method being an arrow function instead of an ES5 declaration. this is set lexically with arrow functions
Since we are invoking a function as a method on an object, this refers to that object.
Since we are invoking a function with the keyword new, this refers to the new instance created.