Created
August 18, 2017 21:13
-
-
Save silesky/75b8d5d1ed3c7349fc8932308d71b456 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
[...Array(101)].map((_, i) => { | |
const divBy = num => i % num === 0; | |
const w = word => `${i}...${word}`; | |
const output = | |
divBy(5) && divBy(7) && w`fizzbuzz` || | |
divBy(5) && w`fizz` || | |
divBy(7) && w`buzz` || | |
w``; | |
output && console.log(output); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment