Difference between Array.slice and Array().slice

后端 未结 6 1101
醉酒成梦
醉酒成梦 2020-12-12 21:04

I am going through John Resig\'s excellent Advanced javascript tutorial and I do not thoroughly understand what\'s the difference between the following calls: (please note t

6条回答
  •  眼角桃花
    2020-12-12 21:39

    How is any call to slice.call() working in the examples provided since a context parameter is not being supplied? Does slice implement it's own call method, thus overriding JavaScript's call method? The call and apply methods take as the first parameter an object to specify the context (this) object to apply to the invocation.

提交回复
热议问题