配列の最大値を得る

昨日・今日と珍しくJavaScriptを書いていたところ、配列の最大値を例えばPythonのように、

numArray = [ 3, 1, 4 ]
max(numArray)

こんな風に書けないかと考えました。検索すると、

Math.max.apply(null, numArray);

Math.max - JavaScript | MDN

このapplyはなんなんでしょうね。
これは、Function.prototype.apply method - JavaScript | MDNに書いてあります。例えば、

Array.prototype.len = function() { return this.length; }
[1,2].len():	// 2
Array.prototype.len.apply("abc");	// 3

lenはArrayのメソッドとして定義しているのですが、applyを使うとthisを"abc"に置き換えて値を返します。
また、

Array.prototype.cat = function(a, b, c) { return this.concat([a, b, c]); }
Array.prototype.cat.apply([1, 2], [3, 4, 5]);	// [1, 2, 3, 4, 5]

applyの第2引数は配列を取ると、展開されて元の関数の引数になります。よって、

Math.max.apply(null, [1, 2, 3]);

は、thisがnullに置き換わるのですが、置き換わるthisがないので、配列が展開されて、

Math.max(1, 2, 3);

と同じことになります。
同様にすると、2次元配列を1次元に展開するコードが書けます。

Array.prototype.concat.apply([], [[1, 2], [3, 4], [5, 6]]);		// [1,2,3,4,5,6]

これは、

[].concat([1, 2], [3, 4], [5, 6]);

と同等です。