by Kirill Chaim Shcherbina

Photo by Fas Khan on Unsplash

What is it?

The JavaScript engine stores function and variable declarations in memory during the compilation phase. So by the time the execution phase comes around they are in memory already.

In other words, when Javascript compiles all of your code, all variable declarations using var are hoisted/lifted to the top of their functional/local scope…