Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#9818 closed defect (invalid)

dojo.forEach - add the ability to break out fo the loop

Reported by: Les Owned by: anonymous
Priority: high Milestone: tbd
Component: General Version: 1.3.2
Keywords: forEach Cc:
Blocked By: Blocking:


dojo.forEach executes the supplied function on each item in the array. Returned values are ignored.

Is it possible to check the returned value and break out of the loop if the value is false? This is exactly how Ext and jQuery work. MooTools? and Prototype also provide a way to break out of the loop, but not dojo.

Change History (2)

comment:1 Changed 13 years ago by liucougar

Resolution: invalid
Status: newclosed

dojo does: try dojo.every and dojo.some

comment:2 Changed 13 years ago by Les

..right.. I completely forgot that you can use dojo.every and dojo.some to simulate breaking out of the loop.

Note: See TracTickets for help on using tickets.