use expression in js code example
Example 1: function expression
const getRectArea = function(width, height) {
return width * height;
};
console.log(getRectArea(3, 4));
// expected output: 12
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`;