Javascript FizzBuzz problem

This is the classic Javascript FizzBuzz problem where the task is to loop through n numbers and print “fizz” for multiples of 3, “buzz” for multiples of 5 and “fizzbuzz” for multiples of 3 and 5 (i.e. 15).

This is a rather simple problem.  The main thing is to test your knowledge of the modulo “%” operator.  It is a unique operator in Javascript that tells you the remainder of a division operation.  Example 9 % 3 = 0; 10 % 3 = 1.  Three goes into 9 three times with 0 remainder.  Three goes into 10 three times with a remainder of 1.


Leave a Reply

Your email address will not be published.