@kt87m/fizzbuzz
v1.0.0
Published
A JavaScript implementation of FizzBuzz.
Downloads
4
Readme
fizzbuzz
A JavaScript implementation of FizzBuzz.
Installation
$ npm install @kt87m/fizzbuzz
Usage
In JavaScript code
const fizzbuzz = require('@kt87m/fizzbuzz')
fizzbuzz(1) // '1'
fizzbuzz(2) // '2'
fizzbuzz(3) // 'Fizz'
fizzbuzz(5) // 'Buzz'
fizzbuzz(15) // 'FizzBuzz'
From the command line
$ npx fizzbuzz 1
1
$ npx fizzbuzz 2
2
$ npx fizzbuzz 3
Fizz
$ npx fizzbuzz 5
Buzz
$ npx fizzbuzz 15
FizzBuzz