Re:Dropbox dives into CoffeeScript
by latchkey on Friday September 14, 2012 @01:22AM
(#4520201)
I think you're stretching here. Passing $.each to a function makes no sense when it is effectively a global anyway. Please give me a real world example of why you would do something like that (not in the functional aspect, that I understand... I am talking specifically about $.each).
I also wouldn't use something called $.each to do a linear search. I'd use underscore.js _.find(), which has a sane api, you return true when you want to stop. This thing I'm looking for has been found.
Array.forEach and _.each() chose not to support returning false. I can only assume that is @jashkenas being wise.
I also wouldn't use something called $.each to do a linear search. I'd use underscore.js _.find(), which has a sane api, you return true when you want to stop. This thing I'm looking for has been found.
Array.forEach and _.each() chose not to support returning false. I can only assume that is @jashkenas being wise.