Fizz Buzz
Count from 1 to 50 and print the numbers out:
  • If a number is a multiple of three, print ‘Fizz’.
  • If it’s a multiple of 5, print ‘Buzz’.
  • If it’s a multiple of 3 and 5, print ‘FizzBuzz’.
For everything else, print the number itself. Note: You may wish to use arithmetic operator remainder (%):
Last modified 1yr ago
Copy link