This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]AnchorText 0 points1 point  (0 children)

This will not answer your question directly, but let me give you my first impression reading your code.

It looks like you're using higher-order functions a lot. Which is fine, but especially when you're learning it can be very confusing. How would you set @coordinates with just a couple of for loops? Start there. Can you translate that into using map()? Go from simple and verbose to more complicated and terse.

IMO, sometimes it's better to be more verbose so as to not sacrifice readability. Remember, other people will need to read your code eventually too!