DEV Community

Discussion on: JS fundamentals: const vs var vs let?

 
pentacular profile image
pentacular

"compiled language" and "interpreted language" are nonsensical terms.

There are python compilers, and there are C interpreters.

These are implementation strategies which can be applied to any language.

Hoisting does effectively rearrange the code so that the declarations are at the top of the scope.

See the algorithm in 18.2.1.3 of ecma-international.org/publication... for example.

JIT compilation is not part of the language specification.

I suggest reviewing the language specification, as it may clarify many of these issues for you.