Skip to content

Instantly share code, notes, and snippets.

@arne-s
Forked from coderberry/for_loop_2.rb
Created February 23, 2013 23:42
Show Gist options
  • Save arne-s/5021879 to your computer and use it in GitHub Desktop.
Save arne-s/5021879 to your computer and use it in GitHub Desktop.
CoffeeScript: For loop
# Nested loops
for x in (1..10) do
for y in (1..10) do
puts x * y
end
end
# Nested loops with mixed data
for x in (1..10) do
for letter in "A".."Z" do
puts "#{x}-#{letter}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment