>> 0;
if (typeof fun !== "function")
throw new TypeError();
var res = [];
var thisArg = arguments.length >= 2 ? arguments[1] : void 0;
for (var i = 0; i < len; i++)
{
if (i in t)
{
var val = t[i];
// NOTE: Technically this should Object.defineProperty at
// the next index,as push can be affected by
// properties on Object.prototype and Array.prototype.
// But that method's new,and collisions should be
// rare,so use the more-compatible alternative.
if (fun.call(thisArg,val,i,t))
res.push(val);
}
}
return res;
};
}
>> 0;
// 4. If isCallable(callBACk) is false,throw a TypeError
exception. // See: http://es5.github.com/#x9.11
if (typeof callBACk !== "function") {
throw new TypeError(callBACk + ' is not a function');
}
// 5. If thisArg was supplied,let T be thisArg; else let
// T be undefined.
if (arguments.length > 1) {
T = thisArg;
}
// 6. Let k be 0
k = 0;
// 7. Repeat,while k < len
while (k < len) {
var kValue;
// a. Let Pk be ToString(k).
// This is implicit for LHS operands of the in operator
// b. Let kPresent be the result of calling the HasProperty
// internal method of O with argument Pk.
// This step can be combined with c
// c. If kPresent is true,then
if (k in O) {
// i. Let kValue be the result of calling the Get internal
// method of O with argument Pk.
kValue = O[k];
// ii. Call the Call internal method of callBACk with T as
// the this value and argument list containing kValue,k,and O.
callBACk.call(T,kValue,O);
}
// d. Increase k by 1.
k++;
}
// 8. return undefined
};
}