code-project / codecheck-171

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FizzBuzz

Write a function to implement FizzBuzz Logic.

Challenge Description

  • 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

Example

Input 1 3 5 15
Output 1 Fizz Buzz FizzBuzz

Test Results before solving the challenge

Initially all the tests will fail with following output.

{{ Initial result of codecheck command }}

Test Results after solving the challenge

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.


Run Tests

In your local environment

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

In web editor

If you are solving it on web editor of codecheck please click on Run button on top-left of web editor terminal.

About


Languages

Language:JavaScript 100.0%