项目作者: generalassembly-atx
项目描述 :
高级语言:
项目地址: git://github.com/generalassembly-atx/fizzbuzz.git
Fizz Buzz
Fizz Buzz is a game about division. Create a program that will iterate through numbers from 1 to 101 and log each number in the console.
- In the loop every time a number is divisible by 3, instead of logging the number itself, the word “fizz” should appear.
- If the number is divisible by 5, the word “buzz” should be logged.
- If the number is divisible by both 3 and 5, then the word “fizzbuzz” should be logged.
Hint: Go read about the Remainder Operator on MDN and figure out how to use it to simplify this problem.
A typical output in the chrome dev tools would look like this:
