In JavaScript Understanding the Weird Parts ,the genesis of a particular execution context was explained in reference to two phases:
In this answer to a related question, the author refers to the interpreter making two passes on the source code.
Has this always been a feature of JS or is it more recent phenomenon related to more modern JS engines which act as JIT compilers?
In general, everything has to be created before it can be used.
And yes, this has been the behaviour of JavaScript since the first standard edition.
But no, modern engines are not interpreters that "make two passes on the source code" any more, they use a parser that extracts the declarations and executable commands in a single pass.