Does it make sense to use .apply( ) and pass the same instance as context?
问题 I'm reading Javascript Web Applications, from O'Reilly. At various points in the book, the author uses something along the following: instance.init.apply(instance, arguments); Does this make any sense? Isn't this exactly the same as: instance.init(arguments); .call() and .apply() are used to manually set the execution context of a function. Why should I use them when I'm intending to use the original execution context anyway? 回答1: The point is that arguments is an array-like object. Doing ...