Sto ragionando su un codice non commentato del mio libro che trovo anche a questa pagina:
http://compatibility.shwups-cms.ch/en/polyfills/?&id=61
non riesco a capire il significato di questa riga:
e neppure questo pezzo:codice:if (i in t && fun.call(thisp, t[i], i, t)) {
qui c'è il listato completo:codice:= function(fun /*, thisp */) {
codice:if (! Array.prototype.some) { Array.prototype.some = function(fun /*, thisp */) { "use strict"; if (this === void 0 || this === null) { throw new TypeError(); } var t = Object(this); var len = t.length >>> 0; if (typeof fun !== "function") { throw new TypeError(); } var thisp = arguments[1]; for (var i = 0; i < len; i++) { if (i in t && fun.call(thisp, t[i], i, t)) { return true; } } return false; }; }

Rispondi quotando