Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6
You are using an arrow function. With arrow functions the this keyword always represents the object that defined the arrow function. In this case, it is the window object. https://www.w3schools.com/js/js_arrow_function.asp Edit: I would also suggest using the spread operator when passing this to Math.max() https://www.sololearn.com/learn/JavaScript/2978/
14th Feb 2020, 10:22 PM
ODLNT
ODLNT - avatar
+ 1
No problems JAM, I'm glad I was able to help.
15th Feb 2020, 8:47 PM
ODLNT
ODLNT - avatar