I'm learning JavaScript and I'm currently trying to figure out why (in Spidermonkey)
[].concat.apply([1], [[2]])
returns the expected [1, 2]
, but
Array.concat.apply([1], [[2]])
returns [2]
instead of [1, 2]
.
Could someone provide a good explanation?