Last active
July 31, 2017 19:31
-
-
Save Torxed/f6656e267085c884853d0af0ca615696 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
<html> | |
<head> | |
<script> | |
for (let i=1; i <= 100; i++) { | |
let map = {3: "Fizz", 5: "Buzz"}; | |
let output = "" | |
for (let key in map) { | |
output += i%key==0 ? map[key] : ""; | |
} | |
console.log(output.length > 0 ? output : i); | |
} | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment