I dont understand why it dose not return yes can some help?
Your code so far
function testLogicalAnd(val) {
// Only change code below this line
if (val >= 50 && val <= 25) {
return "Yes";
}
return "No";
}
// Change this value to test
testLogicalAnd(25);
It can’t return yes
Let’s see your statement
The first part is val >= 50, so “val is greater than or equal to 50”
The second part is val <= 25, so “val is less than or equal to 25”
You have && which is “AND”
In total we have “val is greater than it equal to 50 AND val is less than or equal to 25”
It will always be false, there are no numbers for which it is true.