Exerpad
Exercise 9 · Chapter: ConditionsOptional+50 XP

Fix the Logic

This program should check if a number is between 1 and 10 (inclusive), but the logic is wrong. Fix it!

Example 1: Input 5 → Output In range Example 2: Input 15 → Output Out of range

Need a hint?
3 available · costs 5 XP each
javascript
let n = Number(prompt());
if (n >= 1 || n <= 10) {
console.log("In range");
} else {
console.log("Out of range");
}
Output
Run your code to see the output here.