@nutandevjoshi/is-even-or-odd-as-a-string
v1.0.5
Published
Is the number even or odd?
Downloads
1
Maintainers
Readme
is-even-or-odd-as-a-string
Returns string 'even' if the given number is even else returns 'odd'.
Please consider following this project's author, Pratik Joshi, and consider starring the project to show your :heart: and support.
Install
Install with npm:
$ npm i @nutandevjoshi/is-even-or-odd-as-a-string
Usage
Works with strings or numbers.
const isEvenOrOdd = require('@nutandevjoshi/is-even-or-odd-as-a-string');
console.log(isEvenOrOdd('1')); //=> odd
console.log(isEvenOrOdd('3')); //=> odd
console.log(isEvenOrOdd(0)); //=> even
console.log(isEvenOrOdd(2)); //=> even
Contributors
| Commits | Contributor | | --- | --- | | 1 | nutandevjoshi |
Author
Pratik Joshi
License
Copyright © 2023, Pratik Joshi. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on May 31, 2018.