Manage your learning questions and answers
No answer yet
No answer yet
No answer yet
Function Declaration is declared with the function keyword, starting at the top level (not inside const or let) and it's Hoisted. While Function Expression is a function created and assigned to a variable, and only the variable declaration is hoisted, not the function itself.
{/* Function Declaration */}
function add(a, b) {
return a + b;
}
{/* Function Expression */}
const add = function(a, b) {
return a + b;
};
No answer yet
No answer yet
No answer yet
No answer yet