Hint
Function expressions (var fn = function(){}) — only the var declaration is hoisted, as undefined.
console.log(typeof greet);
var greet = function() { return 'hello'; };
console.log(typeof greet);undefined function
Explanation: var greet is hoisted as undefined. The assignment happens at runtime. Before it, greet is undefined.
Key Insight: Function expressions (var fn = function(){}) — only the var declaration is hoisted, as undefined.