Break forEach loop

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Won't Fix
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: JavaScript
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Ability to stop iterating on a forEach by returning false, similar to jQuery: http://api.jquery.com/jQuery.each/

      The following code would print only 1 & 2.

      [1,2,3,4].forEach(function(v) { print(v); if (v >= 3)

      {return false; }

      })

            Assignee:
            Unassigned
            Reporter:
            Kirk Morales
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: