Created
May 7, 2013 15:22
-
-
Save jonbca/5533464 to your computer and use it in GitHub Desktop.
Is this the only way to turn two arrays into a map in CoffeeScript?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arrayToMap = (attributes, values) -> | |
result = {} | |
for i in [0...attributes.length] | |
result[attributes[i]] = values[i] | |
result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment