Last active
February 20, 2023 02:50
-
-
Save jonrandy/41d627969174c5c133f1b8acfd2a8abd to your computer and use it in GitHub Desktop.
FizzBuzz
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
const fizzBuzz = x=>[x,f='Fizz',b='Buzz',f+b][!(x%5)*2+!(x%3)] | |
const fizzBuzz = (x,f='Fizz',b='Buzz')=>[x,f,b,f+b][!(x%5)*2+!(x%3)] | |
const fizzBuzz = x=>({1:x,6:f="Fizz",10:b="Buzz",0:f+b}[x**4%15]) | |
const fizzBuzz = (x,f="Fizz",b="Buzz")=>({1:x,6:f,10:b,0:f+b}[x**4%15]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment