Skip to content

Instantly share code, notes, and snippets.

@yuya-matsushima
Created February 25, 2013 10:24
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 yuya-matsushima/5028950 to your computer and use it in GitHub Desktop.
Save yuya-matsushima/5028950 to your computer and use it in GitHub Desktop.
list = [1, 2, 3, 4, 5]
for item in list
console.log(item)
for item in list by -1
console.log(item)
// Generated by CoffeeScript 1.5.0
var item, list, _i, _j, _len;
list = [1, 2, 3, 4, 5];
for (_i = 0, _len = list.length; _i < _len; _i++) {
item = list[_i];
console.log(item);
}
for (_j = list.length - 1; _j >= 0; _j += -1) {
item = list[_j];
console.log(item);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment