Basic JavaScript - Comparisons with the Logical And Operator

I honestly feel like this code is right, anybody has any idea why it isn’t working?

  **Your code so far**
function testLogicalAnd(val) {
// Only change code below this line

if (val >= 25 && val <= 50) {
  return "Yes";
}
// 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/103.0.0.0 Safari/537.36

Challenge: Basic JavaScript - Comparisons with the Logical And Operator

Link to the challenge:

Formatting:

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

  if (val >= 25 && val <= 50) {
    return "Yes";
  }
  // Only change code above this line
  return "No";
}

This passes fine for me

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.