Skip to content

Instantly share code, notes, and snippets.

@mverzilli
Created October 8, 2011 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mverzilli/1272923 to your computer and use it in GitHub Desktop.
Save mverzilli/1272923 to your computer and use it in GitHub Desktop.
CoffeeScript vs. Javascript array population
JavaScript:
var data = []
for (var i = 0; i < 84; i++) {
data.push(i * 10 / 84);
}
CoffeeScript:
data = (i * 10 / 84 for i in [0..83])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment