Why in 1 case error, and in the second all is well and why in the second code self, what is she doing?

March 12th 20 at 08:09
1 answer
March 12th 20 at 08:11
Use this in the context of getBoilTime function() {} - is a function of getBoilTime, not a coffeemachine
In the 2nd example , you assign this to a variable self , where this refers to a coffeemachine
To access the . the root of this, you should use the arrow function

and what do you need to reference it for a coffeemachine:? - keon_Gulgowski commented on March 12th 20 at 08:14

Find more questions by tags JavaScript