#02|| Variables in Javascript || Var || Let || Const || Javascript learn with Us

Опубликовано: 30 Октябрь 2024
на канале: Mini Project
10
0

Assalam o Alaikum!
In this video you will learn programming | php | javascript | | Css | Html | Flutter | Adobe Photoshop | Bootstrap | JQuery | and many more....
//Variables

//Variables are Containers for Storing Data.
//JavaScript Variables can be declared in 3 ways:

//a)Using var
//b)Using let
//c)Using const


var



var x=6;
var x=5; //again we are taking x for storing value.it will //display this variable value.

x=9;//now we are chaning x value,this time it will display new value
console.log(x);


In var ,we can use same vaiable and we can assign new value.

interview question: var are Function-scoped.



...............................................................





//Variables

//Variables are Containers for Storing Data.
//JavaScript Variables can be declared in 3 ways:

//a)Using var
//b)Using let
//c)Using const



let


let x=6; // already declared
//let x=5; //again we are taking x for storing value.it will /not display anything

//x=9;//now we are chaning x value,this time it will not //display anything

x=10;//here we can assign new value,it will show new value
console.log(x);


let ,we can not declare same vaiable and but we can assign new value.

interview question: let are Block-scoped.



..............................................

const




//Variables

//Variables are Containers for Storing Data.
//JavaScript Variables can be declared in 3 ways:

//a)Using var
//b)Using let
//c)Using const


const x=6; // already declared
//const x=5; //again we are taking x for storing value.it will //not display anything

//x=9;//now we are chaning x value,this time it will not //display anything

x=10;//we canot assign new value
console.log(x);


const ,we can not declare same vaiable and we can not assign new value .

question: const are Block-scoped.


На этой странице сайта вы можете посмотреть видео онлайн #02|| Variables in Javascript || Var || Let || Const || Javascript learn with Us длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Mini Project 30 Октябрь 2024, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 10 раз и оно понравилось 0 зрителям. Приятного просмотра!