2.Function Expression :
A function expression is a function that is assigned to a variable. It starts with the keyword function, followed by an optional name, a list of parameters enclosed in parentheses, and the function body enclosed in curly braces. Here is an example: