function a(){
function b(){
}
}
In the above code of javascript, during the hoisting phase, will the function b
be hoisted? Or just a
will be hoisted because only function a
is sitting lexically in the global context.
function a(){
function b(){
}
}
In the above code of javascript, during the hoisting phase, will the function b
be hoisted? Or just a
will be hoisted because only function a
is sitting lexically in the global context.
b
will be hosted to the top of the scope it appears in (the scope defined by the body of functiona
) during the hoisting phase when that function (a
) is invoked.b
will not be exported to the global scope.