check-numbers
v0.1.1
Published
Check & find odd or even
Downloads
2
Maintainers
Keywords
Readme
check-numbers
check-numbers is package for check add or even number and find add or even numbers in parameter
Installation
npm install check-numbers
Usage
1. CheckOddEven(number)
CheckOddEven(number)
functions to check whether the number in the parameter is odd or even- usage :
const { checkOddEven } = require("check-numbers")
console.log(checkOddEven(2)) // even
console.log(checkOddEven(3)) // odd
console.log(checkOddEven(12)) // even
2. findOdd(...numbers)
findOdd(...numbers)
function to find all odd numbers in the parameter- usage :
const { findOdd } = require("check-numbers")
console.log(findOdd(2, 3, 5, 2, 4)) // [ 3, 5 ]
console.log(findOdd(7, 8, 12, 9, 3)) // [ 7, 3, 9 ]
console.log(findOdd(20, 51, 33, 21)) // [ 51, 33, 21 ]
3. findEven(...numbers)
findEven(...numbers)
function to find all even numbers in the parameter- usage :
const { findEven } = require("check-numbers")
console.log(findEven(2, 3, 5, 2, 4)) // [ 2, 2, 4 ]
console.log(findEven(7, 8, 12, 9, 3)) // [ 8, 12 ]
console.log(findEven(20, 51, 33, 21)) // [ 20 ]