Please i don't know why the "this" variable didn't reffered to the "arr" variable. I need explanation


2/14/2020 10:10:08 PM


3 Answers

New Answer


You are using an arrow function. With arrow functions the this keyword always represents the object that defined the arrow function. In this 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/


ODLNT thanks very much for the explanation 😊


No problems JAM, I'm glad I was able to help.