Created
January 24, 2016 00:35
Revisions
-
zanedeg created this gist
Jan 24, 2016 .There are no files selected for viewing
This file contains 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,7 @@ function fizzbuzz(str, next) { var iterVal = next % 3 === 0 ? 'Fizz' : ''; iterVal += next % 5 === 0 ? 'Buzz' : ''; str += iterVal ? iterVal : next; return next > 99 ? str : fizzbuzz(str + ',', next + 1); } console.log(fizzbuzz("",1));