Skip to content

Instantly share code, notes, and snippets.

@jonbca
Created May 7, 2013 15:22
Show Gist options
  • Save jonbca/5533464 to your computer and use it in GitHub Desktop.
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?
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