I'm stuck again

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";
}

testLogicalAnd(10);

Your browser information:

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

Challenge: Comparisons with the Logical And Operator

Link to the challenge:

I believe that your {}s are mismatched

1 Like

wow thanks didn’t realize little details like that matters

1 Like

I think you are going to find that little details are all the rage when it comes to programming languages :smiley:

2 Likes

Here is the answere may be helped you

function testLogicalAnd(val) {

  // Only change code below this line

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

   return "Yes";

  }

// Only change code above this line

return "No";

}

testLogicalAnd(10);

Hi @amozahid1030!

Welcome to the forum!

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

You can post solutions that invite discussion (like asking how the solution works, or asking about certain parts of the solution). But please don’t just post your solution for the sake of sharing it.
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.

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

1 Like

Thanks for you valuable text.I will try to more careful about this matter.

1 Like