About the (&&) operator

Tell us what’s happening:

Your code so far


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

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

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

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

Your browser information:

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

Challenge: Comparisons with the Logical And Operator

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

what about it? what’s your question?

You forgot to fill in “Tell us what’s happeing”.

I believe you have a typo in your code.

thank you guys for your help … and i’m sorry that i forgot to ask the question :joy:

Your code has been blurred out to avoid spoiling a full working solution for other campers who may not yet want to see a complete solution. In the future, if you post a full passing solution to a challenge and have questions about it, please surround it with [spoiler] and [/spoiler] tags on the line above and below your solution code.

Thank you.

1 Like

You have a typo in your code. Just after the closing bracket of the if statement you have an extra curly bracket.

1 Like

@Antkibo thanks for your help it works i didn’t see that extra bracket