2 ms·
I'm not sure that's a very good example. myArray.forEach( (item) => { // process item }); doesn't seem ugly to me. It's flexible and concise.
by news_to_me 10y ago
I'm not sure that's a very good example.
myArray.forEach( (item) => {
// process item
});
doesn't seem ugly to me. It's flexible and concise.
- rbanffy 10y agoAn array was a poor example. Think instead of an object: for (item in myObject) { // process item }