Teaching Newbies since 2014

  • Home
  • Javascript ❤
    • JavaScript
    • Node.js
  • WebDev Tuts
  • screencasts
  • Resources
  • VR & AR
  • Github
  • Twitter
  • YouTube
  • RSS
  • C++
You are here: Home / Archives for hoisting

February 1, 2022 by: Kauress

Hoisting in JavaScript – a complete guide

Let’s delve into hoisting in JavaScript! During compilation, microseconds before code is executed, variable and function declarations are “hoisted” i.e. they are added to memory inside a data structure called “lexical environment”. The official ES6 documentation describes the lexical environment as: “Lexical Environment is a specification type used to define the association of Identifiers to specific variables and functions based upon the lexical nesting structure

[ Read More ]

Copyright © 2022 ·Kauress