I am supposed to:
Combine the two if statements into one statement which will return “Yes” if val is less than or equal to 50 and greater than or equal to 25. Otherwise, will return “No”.
I’ve written what appears to be something perfect but FreeCodeCamp rejects it. Here’s my code: https://repl.it/CeFK/2 It works fine but here’s a screencap of the errors:
@texxs, I think @Diego_Perez is trying to say is that you have spelled out “yes” with lowercase in your return statement, where the instructions are telling you to use “Yes”, with uppercase “Y”
sorry @texxs i should have been more clear . Jlevyd15 is right i was trying to say:[quote=“Jlevyd15, post:4, topic:21652”]
you have spelled out “yes” with lowercase in your return statement, where the instructions are telling you to use “Yes”, with uppercase “Y”
[/quote]
function test() {
if (“Yes” !== “yes”) {
return “Not equals”;
} else {
return “equals”;
}
}
test();
The output is = “Not equals”;
function test() {
if (“Yes” === “yes”) {
return “equals”;
} else {
return “Not equals”;
}
}