Skip to content

Instantly share code, notes, and snippets.

@surrealdetective
Created June 9, 2013 22:31
Show Gist options
  • Save surrealdetective/5745541 to your computer and use it in GitHub Desktop.
Save surrealdetective/5745541 to your computer and use it in GitHub Desktop.
a fizzbuzz solution
count = 1
fizz = []
buzz = []
fizzbuzz = []
while count <= 50
fizzbuzz.push(count) if count%3 == 0 && count%5 == 0
fizz.push(count) if count%5 == 0
buzz.push(count) if count%3 == 0
count +=1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment