Concise Body Arrow Functions JavaScript


How can I assign Plant need water to an arrow syntax? And how can I include if statement after that?


We know how to write a function expression, which gets us half the way there…

const plantNeedsWater = function(day) {
  if (day === 'Wednesday') {
    return true;
  } else {
    return false;


Thank you! But I wrote an arrow syntax based on that and it is not correct.

here is what I wrote:
const plantNeedsWater = (day) => {
return day === ‘Wednesday’ ? true : false;


Do the instructions ask for a ternary? You know that `a === ‘b’ is a boolean, already, right?

return day === 'Wednesday';

is all we really need to return. It will be either true or false.