An each function for JS
A couple of weeks ago I found an interesting use of this syntax. Missing Ruby’s wonderful each function, I decided to implement something similar in JS, and, after some experimentation, ended up with this:
The function syntax comes in handy when you use this each:
It may not be as satisfying as Ruby’s each, but it’s quite useful.