I have code like below:
var showName;
function showName() {
};
typeof showName; // function
And we know that JS engine automatically assigns undefined value to variable decalred with var, so in my mind I assume below code will output the same with above(but actually not)
var showName = undefined;
function showName() {
};
typeof showName; // undefined
Any explanation will be thankful