I am working on a array in my code . My array contains mutliple boolean . I want to check that if a single false exists in my array then it returns false otherwise true . I did following
var results = self.resultCollection();
for (var i = 0; i < results.length ; i++) {
if (!results[i]) {
self.isModelValid = false;
break;
} else {
self.isModelValid = true;
}
}
Now i hear from somebody that there is some thing in jquery call grap or may be grasp , i am not confirmed . He told me that that grap/grasp will give you that thing in one line . Anyone knows about that .
Thanks in advance .
grep, look: api.jquery.com/jQuery.grep