Write a program that console logs the nubers from 1 to n. But for multiples of three print "fizz" instead of the number and for the multiples of five print "buzz". For numbers which are multiples of both three and five print "fizzbuzz" .Make use of functions and methods where necessory
You can code this with any language of you choice!
Directions
Write a program that console logs the nubers from 1 to n. But for multiples of three print "fizz" instead of the number and for the multiples of five print "buzz". For numbers which are multiples of both three and five print "fizzbuzz" .Make use of functions and methods where necessory
You can code this with any language of you choice!
Examples
fizzBuzz(5); 1 2 fizz 4 buzz