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
EasyLoop 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
BuzzTry it yourself
let num = parseInt(inp); // Don't change this line
// Type your code belowAll lessons in Fundamentals
4Operators Part 2
Logical Operators Part 1Logical Operators Part 2Recap - Simple LogicLogical Operators Part 3Type Coercion7Bill Split Calculator
Welcome MessageCalculating The Tip And Total2Variables
NumbersStringBooleanNaming ConventionsEmpty VariablesRecap - Initialize VariablesConstants3Operators Part 1
Arithmetic OperatorsModulo OperatorArithmetic ShortcutsComparison OperatorsStrict vs Loose EqualityRecap - Simple Math6Basic IO
OutputOutput with VariablesType Conversion - Part 1Type Conversion - Part 2Recap - Till 120Recap - True or False