UNPKG

evenoddcheck

Version:

A package that quickly sorts even and odd numbers based on input

13 lines (12 loc) 218 B
'use strict'; module.exports = (n)=> { if(n && !isNaN(n)){ if(n%2==0){ return "even" } else { return "odd" } } else { return "not a valid input" } };