Last active
December 15, 2015 20:49
Revisions
-
ScottGo revised this gist
Apr 5, 2013 . 1 changed file with 5 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,15 +3,13 @@ def super_fizzbuzz(array) array.each do |num| if num % 3 == 0 && num % 5 == 0 # return "FizzBuzz" fizzbuzzed.push("FizzBuzz") elseif num % 3 == 0 # return "Fizz" fizzbuzzed.push("Fizz") elseif num % 5 == 0 # return "Buzz" fizzbuzzed.push("Buzz") else #retain original integer fizzbuzzed.push(num) end end -
ScottGo created this gist
Apr 5, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ def super_fizzbuzz(array) fizzbuzzed = [] array.each do |num| if num % 3 == 0 && num % 5 == 0 # return "FizzBuzz" return "FizzBuzz" elseif num % 3 == 0 # return "Fizz" return "Fizz" elseif num % 5 == 0 # return "Buzz" return "Buzz" else return num #retain original integer end fizzbuzzed = [] end