In this very contrived example, I have an array with 3 elements that I\'m looping over using the .each() method.
var vals = $w(\'foo bar baz\'); vals.each( func
Based on the documentation for .each() that you linked to, you should use a throw $break; statement, this should cause further iterations to cease.
.each()
throw $break;
Simply returning will cause the iterator to continue to the next one.