Frontend
Interviews
.dev
Problems
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?
function then number
undefined then number
function then function
number then number
Submit Answer
Reveal Answer
Select an option and submit your answer.
Next Problem
Auto-advance on correct answer