'var' declaration hoisting in JavaScript | var VS let/const

preview_player
Показать описание

----------------------------------------------------------------------------------------
LINKS
-----------------------------------------------------------------------------------------
The Complete HTML Course for Beginners

Frontend Developer Study Plans

Courses, Study Plans, Guides & More

The Code Dose Website

Instagram

Twitter

----------------------------------------------------------------------------------------
TIMESTAMPS
-----------------------------------------------------------------------------------------
0:00 Intro
0:33 var is NOT block-scoped
1:15 var is function-scoped (or global)
3:00 declaration hoisting
4:48 important note on hoisting
5:37 hoisting in let/const & TDZ
6:17 var redeclaration
8:17 DON'T use var
8:28 practice question
Рекомендации по теме
Комментарии
Автор

Well explained. But Please bring advance topics. This kind of content is already there on YouTube.

dhrumilshah
Автор

Hello ma'am it's an informative video thanks for it, by the way what editor or extension is that which gave that warning : x is not defined. in red color 😁

luce
Автор

which extension do you use to show the console output

Atsumuedit
Автор

As First console will print the undefiend because the declaration of x hoisted to the top and the fact that var is variable are not blocked scope and after hoisting its value initalize as 2 and in the inner block let x = 5 as we know let are block scope as the block end x =5 terminate and so the next console will print the x = 2 which is intialize in the outer block Please correct if i am wrong thank you so much 😊

Iamvijay
Автор

why upload just shugel mela please upload complete tutorials

fightflowwithcomedy
welcome to shbcf.ru