Or you could just use the JS equivalent map() method:
Frank Faustino

Hey Frank, appreciate the response. Just as it was the case when I learned Ruby, I find it best to understand the foundation in which the built-in’s are built upon. This blog was more about how to approach a JavaScript problem coming from a different language (in this case, Ruby), than it was about solving the specific example included.

Show your support

Clapping shows how much you appreciated James Miele’s story.