Help With Basic JavaScript: Comparisons with the Logical And Operator

Tell us what’s happening:
function testLogicalAnd(val) {

// Only change code below this line

if (val > 50 && val < 25) {

return “Yes”;

}

return “No”;

// Only change code above this line

return “No”;

}

testLogicalAnd(10);

Your code so far


function testLogicalAnd(val) {
// Only change code below this line

if (val > 50 && val < 25) {
return "Yes";
  }
return "No";

// Only change code above this line
return "No";
}

testLogicalAnd(10);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36.

Challenge: Comparisons with the Logical And Operator

Link to the challenge:


i am really confused
  1. Your code is so far OK but you have to remove the first
return "No";

before “// Only change code above this line

  1. Expected are “>=” and “<=” because ( val is less than or equal to 50 and greater than or equal to 25).strong text