Menu
Coddy logo textTech

Looping The Numbers

Part of the Fundamentals section of Coddy's JavaScript journey. Lesson 55 of 77.

Everything is ready, let's play the game!

challenge icon

Challenge

Easy

Loop over the numbers from 1 to num (the given input), and each time use the function you created to calculate the FizzBuzz result and output it.

For example, for input of 7 output:

Welcome to FizzBuzz!
1
2
Fizz
4
5
Fizz
Buzz

Try it yourself

let num = parseInt(inp); // Don't change this line

// Type your code below

All lessons in Fundamentals

Practice on your own: Online JavaScript compiler