FrontendInterviews.dev

621. Function Hoisting vs var Assignment

Easy•

Predict the output.

console.log(typeof fn)
var fn = 1
function fn() {}
console.log(typeof fn)

What is the correct output/behavior?

Select an option and submit your answer.
Next Problem