Tell us what’s happening:
I have a small issue in solving the logical or operator question where I have to find code for
if (val <=10 || val>=20){
return “Inside”;
}
return “outside”;
testfunction(29);
gives me o/p inside
Your code so far
// function testLogicalOr(val) {
// // Only change code below this line
// if (val) {
// return "Outside";
// }
// if (val) {
// return "Outside";
// }
// // Only change code above this line
// return "Inside";
// }
// testLogicalOr(15);
function testLogicalOr(val){
if(val >= 10 || val <= 20){
return "Inside";
}
return "Outside";
}
console.log(testLogicalOr(15))
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Challenge Information:
Basic JavaScript - Comparisons with the Logical Or Operator