Run the Tests doesn't respond!

Tell us what’s happening:
Hi all, For some reason when i click “Run the tests”…nothin happens…please help

Your code so far


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

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

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

// Change this value to test
testLogicalAnd(10);

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/comparisons-with-the-logical-and-operator/

In JavaScript, you can not make multiple comparisons to the same variable like you are trying to do. You must use the variable name in both of the conditions.

your code is syntactically incorrect which is why it doesn’t allow the checker to run.

change it to be:
if (val >= 25 && val <=50)

1 Like