How exactly does
Math.max.apply(null, arr);
work?
Let's take for example
var arr = [45,25,4,65] ;
Will it compare 'null' and '45' and return the maximum number between the two, like 45?
After comparing, will it then compare the returned number with the next number in the array, such as 25, and return the maximum number?
And how is this calculation performed internally? I believe it follows the same process.