You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For times when removing multiple indexes, looping in reverse order is fastest. I can't think of any other time that I use reverse loops, so instead of requesting a reverse option in .forEach(), a request is being made for a .filter() method.
@param {function()} callback A function to call with each element of the list. Returning false will remove the index. @param {Object} thisArg The object to use as this inside the callback.
Should we also add a can.filter()?
The text was updated successfully, but these errors were encountered:
Even with a while() loop, going backwards is still faster than forwards because setting the iterator back a value isn't necessary. Great idea about the .reject() method. Original post updated.
For times when removing multiple indexes, looping in reverse order is fastest. I can't think of any other time that I use reverse loops, so instead of requesting a reverse option in
.forEach()
, a request is being made for a.filter()
method.@param {function()} callback A function to call with each element of the list. Returning
false
will remove the index.@param {Object} thisArg The object to use as
this
inside the callback.Should we also add a
can.filter()
?The text was updated successfully, but these errors were encountered: