Having a number:
- If the number is a multiple of 3, returns "fizz"
- If the number is a multiple of 5, returns "buzz"
- If the number is a multiple of 15, returns "fizzbuzz"
If none of the above conditions are met, return the number as a string.
Example
number = 1 // => '1'
number = 3 // => 'fizz'
number = 5 // => 'buzz'
number = 15 // => 'fizzbuzz'
number = 6 // => 'fizz'
number = 10 // => 'buzz'
number = 30 // => 'fizzbuzz'
number = 19 // => '19'
Install
npm install
Run test
npm test