JS
var arr = new Array(1,2,3,4,5); var ret = arr.some(function(x) {return x < 6;}) alert(ret); //true ret = arr.some(function(x) {return x == 3;}) alert(ret); //true ret = arr.some(function(x) {return x > 30;}) alert(ret); //false
Combine with other array methods:
var arr = new Array(1,2,3,4,5); var ret = arr.slice(2,4).some(function(x) {return x == 3;}) alert(ret); //true