Addressing the common Fizz-Buzz Prompt
This is a script that prints the numbers from 1 to 100. Multiples of three print “Fizz” instead of the number and multiples of five print “Buzz”. Numbers which are multiples of both three and five print “FizzBuzz”.
[Link to live example]
See the Pen Calculator with JavaScript by Ian Strand (@strandian) on CodePen.
Return to Blog
