3 ms·
CoffeeScript's got you covered. Here's forEach ... for item, index in list ... here's the same over an object ... for key, value of object ... here'
by jashkenas 15y ago
CoffeeScript's got you covered. Here's forEach ...
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.
- herge 15y agoExactly. The number one thing javascript should take from coffeescript is the iteration syntax.