cs.thefarshad
easy Math & Strings

FizzBuzz

Return a list of strings for the numbers 1..n: "Fizz" if divisible by 3, "Buzz" if by 5, "FizzBuzz" if by both, otherwise the number itself as a string. Example: n = 5 → ["1", "2", "Fizz", "4", "Buzz"].

runs in your browser