Didart

Invalid Number

Apr 2nd, 2022
751
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function invalidNumber(input) {
  2.     let digit = Number(input[0]);
  3.  
  4.     if (digit >= 100 && digit <= 200 || digit === 0) {
  5.         console.log();
  6.     } else {
  7.         console.log('invalid');
  8.     }
  9. }
  10.  
  11. invalidNumber(["-1"])
Advertisement
Add Comment
Please, Sign In to add comment