Avoid using break statement in FOR loops (Javascript) | CAST Appmarq