by herge · 14y ago · 0 comments
for i,v in blah
, where i is an index of an array, or a key (not a property!) of a dictionary really too much to ask in 2012?No wonder people are using coffeescript.
for item, index in list
... here's the same over an object ... for key, value of object
... here's the map() ... mapped = for item in list
... here's the filter() ... filtered = for item in list when item.isActive
... and so on.