js expression examples
Example 1: js function expression
const plantNeedsWater = function(day){
if (day === 'Wednesday'){
return true;
} else{
return false;
}
}
console.log(plantNeedsWater('Tuesday'))
Example 2: javascript expression
// EXPRESSION: Code that produces a value
// example(s):
3 + 4
1991
true && false && false
// STATEMENT: Code that performs actions (generally something that ends in ";"
// example:
const str = `String assigned to str`;