I came across an interesting perspective at a recent job interview.Hoisting in Javascript is about moving the variable declarations and function declaration at the top of the script. Can we call this phase as compilation?I am aware about the fact that the Javascript interpreter has 2 passes over the input script where in the first pass it does hoisting and the second pass it actually executes the script. Having known that Javascript is an interpreted language, this question got me a bit confused.
Hoisting in Javascript === Compiling?
javascript