โ† All coding problems

FizzBuzz

EasyLoops

Return a list of strings for 1..n: "Fizz" for multiples of 3, "Buzz" for multiples of 5, "FizzBuzz" for both, otherwise the number as a string.

Function
function solve(n)
Example 1
n = 5
โ†’ ["1","2","Fizz","4","Buzz"]

Submit also runs 2 hidden tests, including edge cases.

console.log output is shown below