0

why use "null" instead of "this"? I tried "this" and it works but in other questions in stack overflow and on mdn(mozilla developer network) it is used with "null". Here's an example.

 var max = Math.max.apply(null, numbersArray); 
jes.alpha
  • 21
  • 1
  • 1
  • 6
  • From that link: "But, max doesn't depend on the current context. So, anything would work in-place of Math/null." – Andy Apr 21 '16 at 12:26
  • `this` doesn't make sense (what does it refer to?). If anything, you should pass `Math`, but as it doesn't matter you just pass nothing. – Bergi Apr 21 '16 at 12:30

0 Answers0