check-even-odd-hehe
v1.0.0
Published
A simple utility to check if a number is even or odd.
Maintainers
Readme
check-even-odd-hehe
A simple utility to check if a number is even or odd.
Installation
Install the package using npm:
npm install check-even-odd-heheUsage
Import the package and use the isEvenOrOdd function:
const isEvenOrOdd = require('check-even-odd-hehe');
console.log(isEvenOrOdd(4)); // Output: "even"
console.log(isEvenOrOdd(7)); // Output: "odd"API
isEvenOrOdd(number)
- Parameters:
number(number): The number to check.
- Returns:
string:"even"if the number is even,"odd"if the number is odd.
- Throws:
- Throws an error if the input is not a valid number.
License
This project is licensed under the MIT License - see the LICENSE file for details.
