let & const in JS 🔥Temporal Dead Zone | | Namaste JavaScript Ep. 8

Published: 04 November 2020
on channel: Akshay Saini
690,202
27k

let & const in JavaScript behave differently when they are Hoisted. Understanding the difference between var, let and const in JS will help you write better code. const and let are in a Temporal Dead Zone until they are initialized some value. You might encounter SyntaxError, TypeError or ReferenceError while using them in your code.

This JavaScript tutorial video covers everything in depth about how let and const are hoisted and how let in js is different from var and const in JS. We will also see what happens behind the scenes in the browser when you use them in code. Another exciting part of the video is the explanation of the difference between Syntax Error, Reference Error, and Type Error in JavaScript.

My tech gear I use every day - http://google.peek.link/2pba

00:00 - Introduction
00:16 - Hoisting of let & const in JavaScript
00:53 - Code example of let declaration hoisting in JS
02:45 - Behind the Scenes of let & const hoisting in browser
05:29 - Temporal Dead Zone in JavaScript
07:44 - Reference Error explained in depth
09:18 - Relation of global object and variables var, let & const
10:54 - Duplicate redeclaration of let and const variables
12:39 - Important Difference between let and const
13:56 - Syntax Error in JavaScript
14:54 - Type Error in JavaScript
15:11 - Difference between SyntaxError vs TypeError vs ReferenceError
17:52 - Difference between var, let or const?
19:00 - How to avoid Temporal Dead Zone
20:07 - Interview Question - Hoisting of let & const
20:24 - Teaser - Diving deep into Block Scope of let & const
21:07 - Thank you for watching Namaste JavaScript 🙏

Support this video series, NOT BY MONEY, but by sharing it with your friends. 🙏
I'll give my best to come up with great content and everything absolutely for free on YouTube. 😊

If you are active on Social Media,
please give a shoutout to Namaste JavaScript and help me reach more people. 🙏

Cheers,
Akshay Saini
http://akshaysaini.in

Would love to Stay Connected with you ❤️
LinkedIn -   / akshaymarch7  
Instagram -   / akshaymarch7  
Twitter -   / akshaymarch7  
Facebook -   / akshaymarch7  

#NamasteJS #AkshaySaini


Watch video let & const in JS 🔥Temporal Dead Zone | | Namaste JavaScript Ep. 8 online without registration, duration hours minute second in high quality. This video was added by user Akshay Saini 04 November 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 690,20 once and liked it 27 thousand people.