I’m a complete noob - thanks for the help.
I’m on the Conditionals → Functions → Function Expressions (page 8/11) assignment.
I passed the assignment but don’t understand how.
I’d expect the below code to return TRUE, but regardless of the day I enter, it always returns false.
Why is that?
const plantNeedsWater = function (day) {
if (day === "Wednesday") {
return true;
} else {
return false;
}
};
plantNeedsWater("Wednesday");
console.log(plantNeedsWater());
Thanks!