Basic JavaScript - Comparisons with the Logical And Operator

Tell us what’s happening:
Describe your issue in detail here.

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

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

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

testLogicalAnd(10);
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 6.1; 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:

There are several little problems.

First, you have an extra }. Proper formatting and indenting will help spot those problems.

Next, here:

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

You have an extra ; in there.

And what are you supposed to return there?

And also, the instructions say, “… less than or equal to 50 and greater than or equal to 25.”

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