Closures in JS  | Namaste JavaScript Episode 10

Closures in JS | Namaste JavaScript Episode 10

Akshay Saini

4 года назад

881,641 Просмотров

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


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

@behindthescene4406
@behindthescene4406 - 25.11.2024 14:35

I didn’t understand one thing like while calling the z(); how 7 is printed can any one please explain it to me, n how z is called though it’s just a variable ?

Ответить
@dupatibhavani2925
@dupatibhavani2925 - 20.11.2024 21:45

in the closures example how variable z becomes function in 11 line? can anyone explain please?

Ответить
@rohitrathod2274
@rohitrathod2274 - 20.11.2024 20:39

bro just roasting all other language like they are nothing

Ответить
@rishabhmishra735
@rishabhmishra735 - 20.11.2024 11:39

thanks sir ,I am falling with love in javascript

Ответить
@swingTrader345
@swingTrader345 - 15.11.2024 09:28

Thank you for sharing

Ответить
@AishwaryaM-r5p
@AishwaryaM-r5p - 13.11.2024 08:37

Ответить
@jotarokujo312
@jotarokujo312 - 12.11.2024 17:09

Thank you so much bro!!! I've watching so many videos and reading articles and this is the one that sticks!! I can't believe it was just that simple!

Ответить
@Adnan-td5iq
@Adnan-td5iq - 12.11.2024 13:23

akahay saini is the king of javascript

Ответить
@atulkamble557
@atulkamble557 - 09.11.2024 10:44

Forget Netflix. Binge-watching this masterpiece!

Ответить
@azijulmunsi5888
@azijulmunsi5888 - 06.11.2024 07:42

Interviewer: what is function?
me : Function is so beautiful so elegant just looking like WOW!!!

Ответить
@harshitsrivastava9903
@harshitsrivastava9903 - 01.11.2024 11:01

🎉

Ответить
@Special_moment_
@Special_moment_ - 29.10.2024 15:59

Closure is function bundled with lexical scope. Thank you saini sir

Ответить
@Special_moment_
@Special_moment_ - 29.10.2024 15:57

Ответить
@gopinathm8986
@gopinathm8986 - 26.10.2024 20:44

This is due to shadowing...... x from 7 to 100

Ответить
@sakhisaheliritika
@sakhisaheliritika - 26.10.2024 13:53

very informative

Ответить
@gauravjain5137
@gauravjain5137 - 25.10.2024 11:03

Great work Akshay

Ответить
@letsfaceit..8821
@letsfaceit..8821 - 23.10.2024 22:32

bro u nailed it

Ответить
@luffy_codes
@luffy_codes - 20.10.2024 23:46

today ending music was of ritviz

Ответить
@luffy_codes
@luffy_codes - 20.10.2024 23:13

Revision Points :
1. A closure is a function that comes bundled with its surrounding variables (lexical scope).
2. Even when we return a function, it still remembers the environment it was created in, so it can access those variables.
3. If we write `return function x() { ... }`, we are returning the function itself, not its value. The function needs to be called to return a value.
4. The returned function is a reference, so any changes made to variables inside it will affect the original variables.

Ответить
@nitishdurga2704
@nitishdurga2704 - 15.10.2024 13:34

if anyone of the viewers is making note can you please share it with us !!!

Ответить
@tadimetivarun8069
@tadimetivarun8069 - 14.10.2024 08:31

Who drinks green tea ! Lol i laughed so hard at this. You make learning javascript so much fun akshay !

Ответить
@shashankreddy1030
@shashankreddy1030 - 08.10.2024 19:20

Thanks

Ответить
@najmuzzamakhan835
@najmuzzamakhan835 - 07.10.2024 13:25

closure: Closure is a function that remembers and has access to the variables of it's outer scope even after outer function has finished executing.

for e.g -

function a(){
let c = 10;
function b(){
console.log(c);
}
return b;
}

let z = a();
z();

In above example the execution context of function "a" is long gone yet this function "b" remembers the values of variable c.

Ответить
@techandgaming6040
@techandgaming6040 - 06.10.2024 05:31

What extension you used in vs code

Ответить
@AdityaSinghRajput-g4w
@AdityaSinghRajput-g4w - 05.10.2024 08:49

great

Ответить
@ranikontham8678
@ranikontham8678 - 03.10.2024 17:08

Oh my godd....I fell in love with his explanations of the closure concept. The way he explains the clouse concept was top notch😍

Ответить
@sudarsanamg1126
@sudarsanamg1126 - 30.09.2024 13:20

plot twist: tomorrow you have js interview

Ответить
@rockwelcome
@rockwelcome - 29.09.2024 20:21

Not clear explanation

Ответить
@BhagatBhutale..
@BhagatBhutale.. - 28.09.2024 21:19

video is useful

Ответить
@TWNOGaming
@TWNOGaming - 26.09.2024 08:42

hindi mein samjhao sir

Ответить
@thrifterspoint1002
@thrifterspoint1002 - 25.09.2024 20:30

wtf is going on...hahaha

Ответить
@4e7-saireddy67
@4e7-saireddy67 - 19.09.2024 23:32

Can you explain y im getting 3 and undefined at output for this code function x(){
var a=3;
function y(){
console.log(a);
}
y();
}
let z=x();
console.log(z);
my doubt is i wrote y() in x() function so when i access x() through let Z why its showing undefined ? it return 3 for the first time why undefined for 2nd time for not mentioning return statement.

Ответить
@english_with_zaki
@english_with_zaki - 17.09.2024 14:52

I want to say we love you man! Thank you for all the efforts and time you devote to making awesome videos like this.

Ответить
@ADARSHGAUTAM-n1u
@ADARSHGAUTAM-n1u - 15.09.2024 15:27

Bhaiya thala for reason😝

Ответить
@surajtopal9940
@surajtopal9940 - 13.09.2024 09:29

🙃🙃🙃🙃

Ответить
@amitsarode1325
@amitsarode1325 - 12.09.2024 14:10

closure and execution context are different or same

Ответить
@PramodKumarSahu-k5m
@PramodKumarSahu-k5m - 12.09.2024 10:00

Good Afternonn...Your teaching process...Nice understanding process of closures.

Ответить
@shubhibishnoi8150
@shubhibishnoi8150 - 07.09.2024 09:43

please please cover more topics in js , like projects n all please akshay.

Ответить
@shubhibishnoi8150
@shubhibishnoi8150 - 07.09.2024 09:42

enjoying a lotttt thnkxxxx.

Ответить
@technologytrends645
@technologytrends645 - 04.09.2024 18:32

how can i setup my browser to check this scope and watch window, I know there are their but its not showing like this . Could you please help

Ответить
@bandewalekeerthi4463
@bandewalekeerthi4463 - 04.09.2024 17:56

Your explanation is really amazing. Thank you so much sir 🙏🙏🙏

Ответить
@tanishkbatra7966
@tanishkbatra7966 - 03.09.2024 15:33

bkc sexyyyy

Ответить
@ritikshrivastav5459
@ritikshrivastav5459 - 02.09.2024 06:35

sir one word you are just amazing.

Ответить
@Akshay-il6ww
@Akshay-il6ww - 30.08.2024 14:40

drink black tea

Ответить
@CodingBharatBisht
@CodingBharatBisht - 27.08.2024 15:51

Love the way you explained
& about green tea also
😄

Ответить
@sujaygoudarpatil4264
@sujaygoudarpatil4264 - 23.08.2024 17:03

I am so excited!!!!!!!!!!!!!!!!! lets goooooo

Ответить
@pragyas_direction
@pragyas_direction - 22.08.2024 15:47

Fantastic video found on closure,which cleared all my doubts....thanks for all your efforts that you put in.

Ответить
@parshvsheth-rj2vq
@parshvsheth-rj2vq - 18.08.2024 17:14

great teacher

Ответить