MMMayur Maluskarinmayur-codes.hashnode.dev·Aug 28, 2021 · 2 min readHoisting in JavaScriptBy definition, Hoisting is the default behavior of moving all the declarations at the top of the scope before code execution, but this is not exactly what happens. Instead, the variables and function declarations are put into memory during the compil...00
MMMayur Maluskarinmayur-codes.hashnode.dev·Aug 28, 2021 · 2 min readLexical scope in JavaScriptIn JavaScript, each function creates its own scope. A new scope is created only when you create a new function. Lexical scope is the ability of a function scope to access variables from the parent/outer scope. Checkout the below diagram for better un...00