Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js function expression

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

console.log(plantNeedsWater('Tuesday'))
Source by masteringjs.io #
 
PREVIOUS NEXT
Tagged: #js #function #expression
ADD COMMENT
Topic
Name
6+3 =