Lowest price ever! Learn Generative AI for 48% less!
Get my discount+ 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/
+ 1
No problems JAM, I'm glad I was able to help.