Advertisement
galink

Untitled

Jul 24th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function invalidNumer([arg]) {
  2.     let x = Number(arg);
  3.  
  4.     if ((100 < x) && (x < 200) || x == 0) {
  5.         console.log(Math.round(x));
  6.     } else {
  7.         console.log('invalid');
  8.     }
  9. }
  10.  
  11. invalidNumer(['150.2']);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement