Write a function to implement FizzBuzz Logic.
- Use {{source code file}} for solving the challenge
- See {{test code file}} for seeing the tests
- FizzBuzz Logic,
- If the number is
- Divisible by
3
replace it with"Fizz"
- Divisible by
5
replace it with"Buzz"
- Divisible by
15
replace it with"FizzBuzz"
- Not Divisible by
3, 5 or 15
do not change
- Divisible by
- If the number is
Input | 1 | 3 | 5 | 15 |
Output | 1 | Fizz | Buzz | FizzBuzz |
Initially all the tests will fail with following output.
{{ Initial result of codecheck command }}
Solve the challenge to pass the tests.
{{ Solved result of codecheck command }}
If you have any suggestions or more interesting way of having this challenge please let us know in answer.md file.
If you are solving the test locally please install codecheck globally by running the following command in terminal.
$ npm install codecheck -g
Now run codecheck
command in terminal in the root folder of challenge.
$ codecheck
If you are solving it on web editor of codecheck please click on Run
button on top-left of web editor terminal.