Well...I'ts hoisting after all

Gajender Tyagi - Aug 12 '21 - - Dev Community

hosisting image from chrom
Well the image is self explanatory. You can get an idea of lexical scope of const and how does hosisting work for const.

For some extra fun change const with --var--

. . . . . . . .