Variable Declaration ( Var - Let - Const ) | Javascript Learning #javascript

preview_player
Показать описание
The var keyword is the oldest way of declaring variables in JavaScript and is supported by all browsers. The let and const keywords are newer additions to the language and are not supported by older browsers.

If you need to support older browsers, you can use var instead of let or const. If you don’t need to support older browsers, you can use let or const. If you want your variable to be immutable, use const.

So, to sum up, the main differences between var, let and const are:

1) var is function-scoped while let and const are block-scoped.
2) var variables can be reassigned while let and const variables can not.
3) var variables are declared using the var keyword while let and const variables are declared using the let and const keywords respectively.
4) const variables are immutable while let and var variables are not.

javascript variable declaration,javascript,javascript variables,javascript variables tutorial,javascript for beginners,ECMAScript,variables in javascript,javascript tutorial for beginners,es6,javascript variables explained,javascript programming,let vs const,var vs let,javascript var,var vs const,front end,web development,javascript variable types,let vs var vs const,var let const,javascript let,const,programming
Рекомендации по теме
Комментарии
Автор

video yang bagus dan luar biasa menarik untuk di tonton good jobs

pastipay
Автор

appreciated the work put into it, this video is so amazing

angiera
Автор

Please I can't see it. How do others see what you type?

Sure_Math_Center