r/adventofcode • u/taliriktug • Dec 02 '15
Spoilers Day 2 solutions
Hi! I would like to structure posts like the first one in r/programming, please post solutions in comments.
15
Upvotes
r/adventofcode • u/taliriktug • Dec 02 '15
Hi! I would like to structure posts like the first one in r/programming, please post solutions in comments.
View all comments
Show parent comment
1
u/Aneurysm9 Dec 02 '15
arr.map() should return a new array with the mapped values, so I'd do something like this:
I haven't actually tested this and I'm not much of a javascript programmer, but it looks correct-ish! :)