Both declarations and expression declare a variable and put the function into it. The difference lies in how the browser parses and loads them into the execution context due to the creation time. Its important because function declarations are hoisted (they are moved to the top and processed regardless of where they are located) just as variables are, while only the variable declaration of a function expression is hoisted:
// declaration
// function declarations needs to have a name
function sayHello1() {
alert("Hello");
}
//If the function declaration has no name, it’s considered a function expression