0
Q:

function expression

const mul = function(x, y){
    return x * y;
}; //semicolon needs to be there as it is expression

console.log(mul(10, 20));
1
const getRectArea = function(width, height) {
  return width * height;
};

console.log(getRectArea(3, 4));
// expected output: 12
1

New to Communities?

Join the community