There's a problem in the group:
What is the result of the following pop-up?
var a = function.prototype.call.apply (function (a) {return a}, [0,4,3])
Alert (a)
Scroll bar to bottom view results
RELATED links: about Call and apply
The result is 4, and the following is the process:
The Apply method is executed first, and then the following method is constructed
var B = (function (a) {alert (this);//0
return A;
). Call (0, 4, 3);
Alert (b)
Related applications:
Using function.prototype.call.apply to implement associative functions skillfully
var call = Function.prototype.call;
var mixin = function (that) {
for (var k)
THIS[K] = that[k];
return arguments.length = = 1?
This:call.apply (Arguments.callee, arguments);
}; This article links http://www.cxybl.com/html/wyzz/JavaScript_Ajax/20120708/31791.html
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.