1const plantNeedsWater = function(day){
2 if (day === 'Wednesday'){
3 return true;
4 } else{
5 return false;
6 }
7}
8
9console.log(plantNeedsWater('Tuesday'))
1const getRectArea = function(width, height) {
2 return width * height;
3};
4
5console.log(getRectArea(3, 4));
6// expected output: 12
7
1const mul = function(x, y){
2 return x * y;
3}; //semicolon needs to be there as it is expression
4
5console.log(mul(10, 20));
1// EXPRESSION: Code that produces a value
2// example(s):
33 + 4
41991
5true && false && false
6
7// STATEMENT: Code that performs actions (generally something that ends in ";"
8// example:
9const str = `String assigned to str`;