Edit in JSFiddle

// Uncomment the fnExpression.  You will find that you get an undefined error.
//fnExpression();   

// The function declaration is fully hoisted and works as expected.
fnDeclaration();

var fnExpression = function() {
    alert('in func expr');
};
 

    
function fnDeclaration() {
    alert('in func decl');
}