Skip to content

Instantly share code, notes, and snippets.

@ukmadlz
Created Mar 6, 2018
Embed
What would you like to do?
FizzBuzz without a for and on one line
console.log([...Array(100).keys()].map(function (i) { return i % 3 === 0 && i % 5 === 0 ? 'FizzBuzz' : i % 3 === 0 ? 'Fizz' : i % 5 === 0 ? 'Buzz' : i; }));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment