Skip to content

projectfunction/FizzBuzz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FizzBuzz

JavaScript starter pack for the 'FizzBuzz' assignment

Task

  • Open the file called fizzbuzz.js
  • Write a program that loops through numbers 1 to 100, and outputs 'Fizz', 'Buzz', 'FizzBuzz', or the number
  • For each number in the loop:
    • If the number is a multiple of 3, output 'Fizz'
    • If the number is a multiple of 5, output 'Buzz'
    • If the number is a multiple of both 3 and 5, output 'FizzBuzz'
    • If the number is not a multiple of either 3 or 5, output the number
  • Output using the output() function. e.g. output('Fizz')

Example

The first 10 lines of the output for your code should be as followed:

1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz

Test Notes

If you want to test the code for yourself before submitting, you can open the vizTest.html file in your browser.

Submission Notes

Once you have completed the task, simply push your changes back to the repository for this assignment. After the submission deadline, only the latest push will be considered. DO NOT EDIT FILES IN THE '_campus' FOLDER! Doing so may lead to a fail.

About

Starter pack for the 'Fizz Buzz' assignment

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published