Ok, so this is confusing me. If I'm not wrong, the only difference between the two is that using apply the second argument can be an array. So, when I do this:
function calcMax(arr) {
return arr
}
console.log(calcMax.apply(null, [1,2,3]))
OUPTUT = 1
but when I do this:
function calcMax(arr) {
return arr
}
console.log(calcMax.call(null, [1,2,3]))
I get the desired output: [1,2,3]
why?