Last active
September 28, 2015 03:07
-
-
Save mteece/1374445 to your computer and use it in GitHub Desktop.
FizzBuzz. For laughs after I read this article http://www.kalzumeus.com/2011/10/28/dont-call-yourself-a-programmer/, that referenced http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html.
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 characters
(function(){ | |
// FizzBuzz | |
for(var i=1; i<=100; i++) { | |
var fizz = (i % 3 == 0 ? "fizz" : "") + (i % 5 == 0 ? "buzz" : ""); | |
console.log(fizz == "" ? i : fizz); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment