2
What is the difference between function expression (named or unspecified) and function definition in relation to Hoisting no Javascript?
Named function expression syntax:
var somar = function somar(a, b) {
return a + b;
};
Function expression syntax, better known as anonymous function:
var somar = function(a, b) {
return a + b;
};
Syntax definition of function:
function somar(a, b) {
return a + b;
}
And where it is most recommended to use each of them?