FizzBuzz algorithm |
Write FizzBuzz algorithm.
|
What do we need? |
We need modulus operator
7%3 = Remainder is 1 because 3 * 2 = 6 7-6=1 |
step 1 - setting up js codeSTEP 2 - add for loopSTEP 3 - add if / else if / else conditionsStep 3 - adding all in |
We need to set up a function.
We need to set up and run a loop
Your code should look like this.
Now, we need to add conditions
Now, all we need to do is insert if statement inside of the function and a for loop.
|