Ajax-loader-large-white
FizzBuzz
Easy as 1, 2, 3

In this project, we're going to build FizzBuzz. It's a children's game where you count from 1 to 20. Easy, right?

Here's the catch: instead of saying numbers divisible by 3, say "Fizz". And instead of saying numbers divisible by 5, say "Buzz". For numbers divisible by both 3 and 5, say "FizzBuzz". "1, 2, Fizz, 4, Buzz"...and so forth.

This project will walk you through building the game in five steps.

Instructions

Let's get started by using console.log to print out all of the numbers from 1 and 20.

But don't just type out 20 console.log statements by hand—use your new programming knowledge to do it more effectively. You should only use ONE console.log in your code.

?
Stuck? Get a hint! Hint
Get live, fast support from Codecademy Advisors when you get stuck. Learn more.

Try using a for loop that you just learned to write out all the numbers.

script.js