Javascript Array all(predicate, context)
Array.prototype.all = function (predicate, context) { context = context || window;//from www. j a va2 s . c o m predicate = predicate || Predicate; var f = this.every || function (p, c) { return this.length == this.where(p, c).length; }; return f.apply(this, [predicate, context]); };