0
Fizzbuzz js
you can write a functional that outputs a number from 1 to n on the console, where n is an integer that functions using a parameter used by the conditions: output hiss instead of numbers multiples of 3; output buzzing instead of numbers multiples of 5; detection of hiss instead of numbers multiples of 3 and 5. You need to make the code output to the number 1046783
3 Answers
+ 3
Instead of 100 in for loop you need to take the input variable of this number.
+ 1
So what is your question?
Need help solving?
Show your attempt.
0
for (let n = 1; n<=100; n++) {
if (n % 15 == 0)
console.log("fizzbuzz");
else if (n % 5 == 0)
console.log("buzz");
else if (n % 3 == 0)
console.log("fizz");
else
console.log(n);
}
how to create so that I had not a limit to 100 but to 1046783?