Function declarations are hoisted. You can call them before their definition:
greet() // Works!
function greet() { console.log("Hi") }
Function expressions are not hoisted:
greet() // Error!
const greet = function() { console.log("Hi") }
Use declarations when you want the function available throughout the scope. Use expressions when you need to assign conditionally or pass as values.