es5 array.some filter code example
Example: js any array
// There's no isEmpty or any method.
// You can define your own .isEmpty() or .any()
Array.prototype.isEmpty = function() {
return this.length === 0;
}
Array.prototype.any = function(func) {
return this.some(func || function(x) { return x });
}