Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function numberInRange(input) {
- let num = Number(input[0]);
- if (num >= -100 && num <= 100 && num !== 0) {
- console.log("Yes");
- }
- else {
- console.log("No");
- }
- }
- Pешение с тернарен оператор:)
- function numberInRange(input) {
- let num = Number(input[0]);
- console.log(num >= -100 && num <= 100 && num !== 0 ? "Yes" : "No");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement