I found this code, and I do not understand the purpose of the comment block in the parameters:
if (!Array.prototype.some)
{
Array.prototype.some = function(fun /*, thisp*/)
{
var len = this.length;
if (typeof fun != "function")
throw new TypeError();
var thisp = arguments[1];
for (var i = 0; i < len; i++)
{
if (i in this && fun.call(thisp, this[i], i, this))
return true;
}
return false;
};
}
In my opinion, this could be a normal second parameter, and this line could be deleted:
var thisp = arguments[1];
source
share