Learn Why JavaScript Hoisting Is A Myth! An EPIC Explanation!



Learn Why JavaScript Hoisting Is A Myth! An EPIC Explanation!

Learn Why JavaScript Hoisting Is A Myth! An EPIC Explanation!

The idea that variables are hoisted to the top of the scope in JavaScript is open to debate… have you ever heard of the “Temporal dead zone”? If not, then you need to watch this!

Knowing how to declare variables correctly, and understanding what scope and hoisting mean, are the three most important aspects for beginners when learning JavaScript.

00:00 – What hoisting is Not!
02:34 – Why “var” seems hoisted
03:53 – The naughty var accomplice
04:41 – What is the “Temporal dead zone”?
07:48 – How “let” behaves the same as “var”
08:23 – Hoisting declared function definitions
09:04 – Function expressions cannot be hoisted