function declaration function expression code example
Example: function expression and function declaration
// Function Declaration
function add(a, b) {
return a + b;
}
console.log(add(1,2)); //3
// Function Expression
const add = function (a, b) {
return a + b;
};
console.log(add(1,2)); //3