Skip to content

Instantly share code, notes, and snippets.

@tatsushitoji
Last active June 20, 2019 01:57
Show Gist options
  • Save tatsushitoji/9ad7d2a9cc850d0921ca7676ea18d6d2 to your computer and use it in GitHub Desktop.
Save tatsushitoji/9ad7d2a9cc850d0921ca7676ea18d6d2 to your computer and use it in GitHub Desktop.
FizzBuzz
const fizzBuzz = x =>
x % (3 * 5) === 0 && 'fizzbuzz' || x % 5 === 0 && 'buzz' || x % 3 === 0 && 'fizz' || x;
Array.from([...Array(100).keys()], x => fizzBuzz(x + 1));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment