top of page
shishantpandey

FIZZBUZZ IN JS

Updated: Aug 28, 2022

for (let i = 0; i < 101; i++) { if (i % 3 != 0 && i % 5 != 0) { document.write(i, ","); } if (i > 0 && i % 3 == 0 && i % 5 != 0) { document.write("Fizz", " ,"); } if (i > 0 && i % 5 == 0 && i % 3 != 0) { document.write("Buzz", ","); } if (i > 0 && i % 3 == 0 && i % 5 == 0) { document.write("FizzBuzz", ","); } }



3 views0 comments

Comentários


Post: Blog2_Post
bottom of page