UNPKG

@yashsaitwal01/even-odd

Version:

A function that returns if value value is even or odd.

8 lines (4 loc) 215 B
const evenOdd = (val) => (val % 2 ? "Odd" : "Even"); const isNumber = (val) => typeof val === "number"; const isString = (val) => typeof val === "string"; module.exports = { evenOdd, isNumber, isString };