Algorithms·easy 10 min 50 XP
FizzBuzz
Return "Fizz" for multiples of 3, "Buzz" for multiples of 5, "FizzBuzz" for both, else the number.
Examples
- fizzBuzz(15) → "FizzBuzz"
- fizzBuzz(3) → "Fizz"
Constraints
- Keep the required function name so the tests can find it
- Return a value instead of only logging it
- Do not mutate inputs unless the challenge asks you to
FizzBuzz · editor
Code runs in an isolated Web Worker with a 3-second timeout — no DOM access, and it can never hang the page.