Here you can find the source of where(f)
Array.prototype.where = function(f){ var newArray = []; for(var i = 0; i < this.length; i++){ if(f(this[i])){ newArray.push(this[i]);//from ww w.j a v a 2 s .co m } } return newArray; };
Array.prototype.where = function(argument) { return this.filter(item => argument(item)); };
Array.prototype.where = function (attribut, value) { var res = []; for (var i = 0; i < this.length; i++) { if (this[i][attribut] == value) res.push(this.slice(i, i + 1)); return res; };
Array.prototype.where = function(callback){ if(!callback) return; for(var i = 0; i < this.length; i++){ if(callback(this[i])){ return this[i];
Array.prototype.where = function(exp){ var exp = new Function("$", "return " + exp); var arr=[]; for(var i=0; i<=this.length-1; i++){ if(exp(this[i])){ arr.push(this[i]) return arr; ...
Array.prototype.where = function(f){ var fn = f; if(typeof f == 'string'){ if((fn=lambda(fn)) == null){ throw "Syntax error in lambda string: "+ f; };
Array.prototype.where = function(func) { var result = []; for (var i = 0; i < this.length; i++) if (func(this[i])) result.push(this[i]); return result; };
Array.prototype.where = function(func){ var result = []; forEach(this, function (element) { if(func(element)){ result.push(element); }); return result;
Array.prototype.where = function (func) { var items = [], length = this.length; for (var i = 0; i < length; i++) { if (func(this[i])) items.push(this[i]); return items.length === 0 ? null : items;
Array.prototype.where = function (inclusionTest) { var results = []; for (var i = 0; i < this.length; i++) { if (inclusionTest(this[i])) results.push(this[i]); return results; }; Array.prototype.select = function (projection) { ...