[–] blakehaswell 12y ago ↗ Good article, but I wanted to point out that the looping and comprehensions stuff isn’t really much different with ES5’s array methods.The first example can actually be written as the much more readable: myArray.forEach(function (item) { // do something with item }); While the second example can be written as: var myNewArray = myArray.map(modify); [–] [deleted] 12y ago ↗ (comment deleted)
2 comments
[ 2.8 ms ] story [ 13.8 ms ] threadThe first example can actually be written as the much more readable:
While the second example can be written as: