Hoisting Q1
a();
function a(){
console.log('hi');
}
function a(){
console.log('bye');
}
Thoughts
My initial though would be that the function gets reassigned?
If the hoisting moves up, during the first pass?
a = undefined
function a = () {
} ?
function a = () {
} ?
My thought process is that because the function is hoisted up and then reassigned, then the function scope is whatever is the latest function?
Last updated