Advertisement
Guest User

Untitled

a guest
May 24th, 2017
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. function isOddOrEven(string) {
  2. if (typeof(string) !== 'string') {
  3. return undefined;
  4. }
  5. if (string.length % 2 === 0) {
  6. return "even";
  7. }
  8.  
  9. return "odd";
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement