All exercises

FizzBuzz

IntroJavaScript

Runs entirely in your browser — your code never leaves your machine.

Problem

Return an array of strings for the numbers 1 to n. • Multiples of 3 → "Fizz" • Multiples of 5 → "Buzz" • Multiples of both → "FizzBuzz" • Everything else → the number as a string, e.g. "7" fizzbuzz(5) → ["1", "2", "Fizz", "4", "Buzz"]

Related cheat sheet
Your code
Press Run tests to check your solution.