Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function invalidNumer([arg]) {
- let x = Number(arg);
- if ((100 < x) && (x < 200) || x == 0) {
- console.log(Math.round(x));
- } else {
- console.log('invalid');
- }
- }
- invalidNumer(['150.2']);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement