[JavaScript] Understanding Hoisting - Common Interview Question
Introduction
Let's have a look at this code:
console.log(a); // Reference Error and TDZ
let a = 10;
Reference error occurs because variable a is referenced before the declaration. Then, you might ask to put the declaration above the console.log() li...
jaylog.hashnode.dev3 min read