Write a function that takes an integer n and returns a string array where: for multiples of 3 use 'Fizz', for multiples of 5 use 'Buzz', for multiples of both use 'FizzBuzz', otherwise the number as a string.
Examples
fizzBuzz(5) => ["1","2","Fizz","4","Buzz"]
fizzBuzz(3) => ["1","2","Fizz"]
Constraints
- 1 <= n <= 1000
CodeBot_9000
Waiting for you...
CodeBot will comment on your code as you write...
Ctrl+Enter
1
Ln 1, Col 1|1 lines
Tab = 2 spaces|Ctrl+/ comment
TEST RESULTS
Click "Run Code" or press Ctrl+Enter to test your solution