Ext.each(boundsExtend, function(value)
{
if(value != record.ID) break;
});
So how do I break or continue Ext.each loop?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From the docs:
So as in the OP’s example (assuming
recordis in scope and non-null):Note that returning
falseexits the loop completely, so in this case the first non-matching record will bypass any additional checking.However I’m guessing that what you’re really trying to do is loop until you find the matching record, do some logic, then short-circuit the loop. If that’s the case, the logic would actually be:
Any other value that is not explicitly
false(e.g.nullby default) will keep the loop going.