I’ve tried what the video says to do and what people on here say to do and it’s not working. I have no idea what I’m doing wrong, anyone else???
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/113.0.0.0 Safari/537.36
Challenge: Basic JavaScript - Comparisons with the Logical And Operator
No the instructions don’t I just saw someone in the help thread say that’s what they did so I thought I might as well try that too. The second condition you’re suppose to delete according to the video but as you said it could be out dated but even when I did both it still didn’t work.
Ok so I’m so close I got all checks except for 2 that say " you should only use the && operator once " and " you should only have one if statement "
This is what I have so far
function testLogicalAnd(val) {
// Only change code below this line
if (val <= 50) {
if (val >= 25) {
return “Yes”;
}
}
// Only change code above this line
return “No”;
}
so close! now its just saying I need one “if” statement only. In the video the dude just deleted the section underneath but doesn’t work when I do it this is the part that confused me the most
I just deleted the if from the first line and it did nothing so I put it back and deleted the second if on the second line also did nothing. Hope that makes sense.