filmov
tv
JS Tutorial for beginners 1 - Const vs Let vs Var #tech #programming #reactjs #javascript #web
![preview_player](https://i.ytimg.com/vi/eXgG2i1CAxA/maxresdefault.jpg)
Показать описание
In toda's video , JS Tutorial for beginners 1 , we are exemplifying the usage of const, let and var variables through a coding example . Learning JS can be hard , especially at first , so here's a channel that makes money making, language learning and programming easy, so subscribe to Learn online easy with Andrei.
#tech #programming #reactjs #javascript #web
Lesson content :
Scope essentially means where these variables are available for use.
- var declarations are globally scoped or function/locally scoped. They can be modified and reinitialized as you please
A block is a chunk of code bounded by {}. A block lives in curly braces. Anything within curly braces is a block.
- So a variable declared in a block with let is only available for use within that block.
- let can be updated but not re-declared.
Variables declared with the const maintain constant values.
- const declarations are block scoped
- Like let declarations, const declarations can only be accessed within the block they were declared.
- const cannot be updated or re-declared
#tech #programming #reactjs #javascript #web
Lesson content :
Scope essentially means where these variables are available for use.
- var declarations are globally scoped or function/locally scoped. They can be modified and reinitialized as you please
A block is a chunk of code bounded by {}. A block lives in curly braces. Anything within curly braces is a block.
- So a variable declared in a block with let is only available for use within that block.
- let can be updated but not re-declared.
Variables declared with the const maintain constant values.
- const declarations are block scoped
- Like let declarations, const declarations can only be accessed within the block they were declared.
- const cannot be updated or re-declared