Is there a way to break out of the Qooxdoo qx.data.Array forEach loop?
For example,
myarray.forEach(function(obj){
if(obj.match(/ra/i)){
//break out of the loop
}
}
No, thats not possible. If you need that, you could think about using a regular for loop and break on the condition.
Not sure about the version that existed in 2013 but currently there is the array method some
. If you return a Boolean true
from the function passed in, the loop will terminate.
myarray.some(function(obj) {
if(obj.match(/ra/i))
{
// do something
return true;
}
}, this);