3 ms·
[].slice.call(arguments) returning a new argument is fundamentally different because you would not want x.slice(1,2) to modify x in order to produce an appropri
by ynniv 14y ago
[].slice.call(arguments) returning a new argument is fundamentally different because you would not want x.slice(1,2) to modify x in order to produce an appropriate sublist to return. Perhaps it's just me, but I expect a constructor to initialize "this" (optionally returning "this"), but not returning {};
- lhorie 14y agoDisagree. To illustrate: window.test = 2 var b = Object.call(window) //this is the same as `var b = window.Object()` and therefore the same as `var b = Object()` assert(b.test == 2) //why should this be true?