ES6 Tutorial #2: var, let and const | Variable Scope | Modern Javascript 2021

preview_player
Показать описание
ES6 Tutorial #2: var, let and const | Variable Scope | Modern Javascript 2021.

let and const are 2 keywords that are added in ES6 to declare variables.
In ES5 var keyword is used but some issue are attached with var because only function can create a scope when we use var, anything inside function is private and anything outside function is global and block don't create scope in ES5 which leads to issue because sometime data may override our variable.
So to control the accessibility of our data ES6 introduced let and const which allow you to create block scope.
Now in ES6 unlike ES5 we can't redeclare a variable with same name and we can't use the variable before declaring it.

On other hand const are similar to let , the only difference is const are used to create read only values, which can't change.

There is one practice question at time , so take a look and comment me your answer.

I hope you have liked this video. For such more video like and subscribe my
channel

If you want to learn Angular then

Follow us on:

For more such interesting videos, please subscribe to our channel and stay connected.

#letConst​ #ModernJavaScript #NishaSingla
Рекомендации по теме
Комментарии
Автор

Great Inside block : GoodMorning
Great Outside block : Hello

harika
Автор

Awesome explanation, god has given good explanation power to you, your teaching services are very help to software engineers. I really enjoyed a lot, thank you.

myvue
Автор

The way you teach it's really incredible. I have watched all your videos.

sajidahmad
Автор

I see that u r remembering each small and minute rules of javascript...either it comes with great practice or memory power...subscribed

swaroopk
Автор

Nisha, your are doing a great work... God bless you... Thanks for all your effort.

ranjanpanda
Автор

You are my lovely teacher. The way of your teaching very very excellent. I watched all ur videos

lakshminadakuditi
Автор

11:50 Output :

Greet inside console Good Morning
Greet outside console Hello

samarscript
Автор

Amazing Nisha Singla... Almost spoon feeding ❤😅
Accidentally came accross. Subscribed

harishb
Автор

You are an amazing teacher, Thank you so much Nisha

moonboy
Автор

greateinside block : Good-morning
greate outside lock : hello

Harsha-vskl
Автор

<script>
let greet = "Hello";
{
let greet = "Good Morning";
document.write("Great Inside " + greet + "<br>");
}
document.write("Great Outside " + greet);
</script>

Great Inside Good Morning
Great Outside Hello

ChandanSingh-jsos
Автор

So nice... Got good clarity.. Thank you so much...❤️

madhavikesana
Автор

Nisha, Heartly I"m thanking you Your way of teaching is so awesome Please post videos of Redux JS too if

nilayshukla
Автор

Greet inside console Good Morning
Greet outside console Hello

vasanthapandiyanm
Автор

yeah i was a amazing session i learned a lot but you should make some videos in HINDI also because lot of people they could't understand ENGLISH properly
THANK YOU

s_w_i_m_p_r_o
Автор

does this rules apply nowor js has changed

olivebishop
Автор

could please explain, callback and callback hell, clouser videos

sss
Автор

Greet inside console Good morning
Greet outside console Hello

SubrahmanyaMalali
Автор

Hello ma'am muje javascript learn krna hai kafi time ho gya learn nhi kr pa raha hu

Abhisheksoft
Автор

Output:

Greet inside console Good Morning
Greet outside console Hello

rayganmudberry