Created
October 23, 2015 20:59
-
-
Save kencrocken/3ea5472c34841350c6b1 to your computer and use it in GitHub Desktop.
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(num) { | |
return (num % 3 * num % 5 == 0) ? (num % 3 == 0 ? "fizz" : "") + (num % 5 == 0 ? "buzz" : "") : num; | |
} | |
for(i = 1; i < 101; i++){ | |
var y = fizzBuzz(i); | |
$("#result").append('<p>'+y+'</p>'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment