Global and local scope in javascript | chai aur #javascript

Global and local scope in javascript | chai aur #javascript

Chai aur Code

1 год назад

158,488 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@debajyotimitra369
@debajyotimitra369 - 27.11.2024 13:49

loving it and learning it. Thanks Hitesh Sir😇

Ответить
@DiscoveryDepot.
@DiscoveryDepot. - 17.11.2024 15:45

thank you

Ответить
@Prashant_Jagtap_YT
@Prashant_Jagtap_YT - 13.11.2024 12:10

4 years of college ❌ Hitesh sir ✅💀☠️ love from Pune❤

Ответить
@zeelgolwala-f7h
@zeelgolwala-f7h - 08.11.2024 14:13

Thank you so much sir itne achhe se samjhane k liye main JS kafi time se Sikhne ka try kr rhi thi but aapne itne achhe se sikhaya hai ...thank you ❤

Ответить
@markiV643
@markiV643 - 29.10.2024 07:10

chai or code

Ответить
@mahimasingh7524
@mahimasingh7524 - 20.10.2024 07:57

Thank you so much sir ❤😊

Ответить
@munitalks
@munitalks - 12.10.2024 23:36

gajjab ka content hai

Ответить
@ManuKumar-yq1nt
@ManuKumar-yq1nt - 11.10.2024 05:44

Hitesh Choudhary I am watching your videos and practicing the concepts on daily basis and hope to become fluent in it one day. Just one thing - I don't sit with Chai because I watch this in the morning around 7 or 8 am. And I take tea in the evening only 😃

Ответить
@_daya.shankar_
@_daya.shankar_ - 08.10.2024 21:22

Thank you so much, Hitesh Sir 🙏. I have watched your JavaScript English series too, but since I come from a Hindi background, I can now understand the concepts much more easily. Thanks again!

Ответить
@umerrahim2768
@umerrahim2768 - 06.10.2024 08:34

06/10/24 >>> {21/51}

Ответить
@IjazAhmad-wv9qx
@IjazAhmad-wv9qx - 16.09.2024 05:43

but what when we have to declare a let type of variable in global scope and need to update it in scope {} and then print updated values out side of scope?
""
let a =10
{
// update value
a=a+1
}
//need to print 11 here
console.log(a)
""
how to handle this scenario?

Ответить
@kunal-wn4pk
@kunal-wn4pk - 13.09.2024 02:04

Best video of js .

Ответить
@aryanpatelyt7562
@aryanpatelyt7562 - 13.09.2024 00:57

Thank you very much

Ответить
@TrilokSen-fz4yx
@TrilokSen-fz4yx - 11.09.2024 19:48

Nice

Ответить
@DeepakKumar-g3m7p
@DeepakKumar-g3m7p - 08.09.2024 17:56

CFBR

Ответить
@Ck_Ak_i43
@Ck_Ak_i43 - 07.09.2024 06:39

sach me sir aapke jaise pdhane ki technique kisi ke pass nhi .... aapke jaise teachers ki jrurat har CS background ke colleges me kyuki wha iss trh se depth me or practically cheejo ko nhi smjhate hai.... syd unlogo ne v aapki series nhi dekhi🤭.... thank you so much sir aisi series bnane ke liye

Ответить
@nageshkokare9050
@nageshkokare9050 - 06.09.2024 14:49

Sir c++ ka course khatam hone k baad DSA with javascript padhaiye na please sir

Ответить
@multioramaenterprises6198
@multioramaenterprises6198 - 04.09.2024 21:07

Sirf ratt rtaa k 4 din my asy ni bn jatay hain teachers, great saying, Amazing methodology of teaching. Keep creating knowledgeable content for us.

Ответить
@japtavyasingh7334
@japtavyasingh7334 - 04.09.2024 13:30

great video

Ответить
@techgamerz498
@techgamerz498 - 03.09.2024 15:54

Summary Of Lec-21:
// Scope of var.let,const

// 1. const : once it is created and intialzed it will not be changed.
// 2. var,let : var,let value will be changed if you want.
// 3. All there variables inside teh function and outside is global.
// 4. But if you create a var inside if/while/else/elseif... then var becomes global and the value gets changed as mentioned below value will get 3.

// * Avoid using var, you can prefer const and let, most preferred let as it can be changed in some cases when needed. *
var c = 300
let a = 365
const b = 2

// ----> In case if/else/elseif...... the scope becomes block/local scope

if (true) {
let a = 10
const b = 20
// b=2 // it will not change and gives an error --->TypeError: Assignment to constant variable.
console.log("Block of B ",b) // 20 --> const b once is updated in block scope but if you try again to change it will not as it is const datatype.
console.log("INNER: ", a); // 10 --> here a becomes
// c=3 ---->var c is changed to 3 and become global value.
}



console.log(a); // 365 --> even if a,b is changed inside the if it will remain it's global value which is intialized before if.
console.log(b); // 2
console.log(c); // 300 ----> if inside the if the c value is changed then that value(3) is printed here as it becomes global.

Ответить
@fatimaiqra2169
@fatimaiqra2169 - 03.09.2024 08:42

thanks

Ответить
@LegendXo_OP
@LegendXo_OP - 31.08.2024 17:06

attendance

Ответить
@kuntal9734
@kuntal9734 - 28.08.2024 21:28

Thank you sir ❤

Ответить
@kripashanker7201
@kripashanker7201 - 26.08.2024 14:45

dhanyaad sir

Ответить
@aggsha7580
@aggsha7580 - 24.08.2024 12:42

Thanks A Lot Sir ❤❤

Ответить
@AmanRaza-uv2qc
@AmanRaza-uv2qc - 19.08.2024 16:01

sir maine kafi saari video dekhi pr zada kuch samjh nhi aa rha tha pr app ki video se array,object,function,scope ye sab kafi achche se samajh aa gya

Ответить
@AbhishekYadav-xu7xp
@AbhishekYadav-xu7xp - 07.08.2024 13:13

You are one of the best teacher i have been seen ever ❤❤ hat's off to you sir

Ответить
@harshvardhan4381
@harshvardhan4381 - 06.08.2024 18:07

Thank you for your effort, sir. I'm really thankful to you from the depths of my heart. After finishing my engineering, I have a good command on my javascript from earlier but I got lots of new concept from this playlist. Thanks a lot sir 🙏

Ответить
@alltownfacts8259
@alltownfacts8259 - 05.08.2024 11:04

After watching so many tutorial finally found something which make it easy to understand javascript i wish i could have come here earlier.

Ответить
@dhruvpandat1077
@dhruvpandat1077 - 30.07.2024 11:21

Maza aa raha h coding sikhne m meri chai kha h (jack🐱 ki awaj m )

Ответить
@m_sahoo12
@m_sahoo12 - 21.07.2024 16:50

In depth Guy plays actionable task

Ответить
@jrahul42
@jrahul42 - 15.07.2024 21:48

Great video

Ответить
@RishabSalgaonkar
@RishabSalgaonkar - 08.07.2024 18:53

love the series sir

Ответить
@ruchikarawani
@ruchikarawani - 06.07.2024 13:12

😃

Ответить
@Ali-2812
@Ali-2812 - 30.06.2024 17:47

Hello from Pakistan. Amazing content!

Ответить
@hamidrafique1198
@hamidrafique1198 - 22.06.2024 06:14

sir serirs bht achi ha kindly DSA in JS b launch kren please

Ответить
@iambishwaa
@iambishwaa - 20.06.2024 09:14

done ✅✅

Ответить
@iambishwaa
@iambishwaa - 20.06.2024 09:14

done ✅✅

Ответить
@DeveloperArhamAli
@DeveloperArhamAli - 20.06.2024 06:26

nice

Ответить
@swapnildapkosh2813
@swapnildapkosh2813 - 08.06.2024 17:37

I am following this series from the starting the way of teaching of Hitesh sir is amazing. Best JS series on the Internet.

Ответить
@aakashsaini9472
@aakashsaini9472 - 04.06.2024 10:57

sir your way of teaching is great, littterally it is the best JS series available on the internet among the paid courses also

Ответить
@HimanshuMeena-hi9nq
@HimanshuMeena-hi9nq - 03.06.2024 05:36

1

Ответить
@raushanrawat620
@raushanrawat620 - 02.06.2024 10:02

More in-depth chahiye sir ❤😮

Ответить
@PrabeshPB
@PrabeshPB - 27.05.2024 17:21

Love from Nepal🇳🇵

Ответить