ProdanTenev

numberInRange

Feb 12th, 2022 (edited)
1,183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 0.20 KB | None | 0 0
  1. function numInRange(input) {
  2.     let number = Number(input[0]);
  3.     if (-100 <= number && number <= 100 && number != 0) {
  4.         console.log("Yes");
  5.     } else {
  6.         console.log("No");
  7.     }
  8. }
Add Comment
Please, Sign In to add comment