JavaScript Bangla Tutorial : 06 | Variable Declaration & Initialization In JavaScript.

Опубликовано: 06 Июнь 2021
на канале: Clever Coder
122
4

Declaring a Variable Without Initializing:
We start with the JavaScript syntax for creating variables. We can use the let keyword. We use the let keyword when variables are mutable. That means we can change or set the value later on in the program. When the value of the variable will never change, when it stays constant, we use the keyword const. These keywords are available since ECMAScript 6 standard.
Before ES6 there was the var keyword, but this one has some problems were we don't go in this article. When possible avoid the var keyword, but you'll see it in older programs.
We follow it with a whitespace and a name for our variable. Next, we can decide to assign it an initial value or leave it unassigned. Declaration without initialization:
let score;
We can still assign the value later on.


Variable Declaration and Initialization:
We initialize our variable by assigning it a value. We can use a literal value, another variable(s) or the result of some computation or expression. Don’t forget a semicolon at the end of the expression. Declaration with initialization:
let score = 5;
or
const pi = 3.14;
The let keyword is only used for the declaration part. If we want to initialize or change a value of our variables after the declaration, just assign (equals symbol “=”) the value without using the keyword var before the variable name score = 10;.


HTML & CSS Playlist :    • Install Visual Studio Code And Make First ...  


Social Media Platform :

Follow on my Facebook :   / dhalisourav22  
Follow on my GitHub : https://www.github.com/dhalisourav22
Follow on my Instagram :   / dhalisourav22  
Follow on my Twitter :   / dhalisourav22  


#String_concatenation_in_js #Variable_Declaration #Variable_Initialization_In_JavaScript #javascript_tutorial_for_beginners #javascript_course #javascript_tutorial_bangla #javascript_tutorial_advanced #clever_coder #dhalisourav22


На этой странице сайта вы можете посмотреть видео онлайн JavaScript Bangla Tutorial : 06 | Variable Declaration & Initialization In JavaScript. длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Clever Coder 06 Июнь 2021, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 122 раз и оно понравилось 4 зрителям. Приятного просмотра!