What's Closure? | JavaScript

preview_player
Показать описание
What's Closure in JavaScript?

The same way that a function can return a string, object, array, or integer, a function can also return another function. Again, this is because functions are first class objects in JavaScript just like any other object.

According to the MDN Article on Closures, a closure is the combination of a function and the lexical environment within which that function was declared.

From You Don't Know JS, "a closure is when a function is able to remember and access its lexical scope even when that function is executing outside its lexical scope."

Hope this is helpful, give me a thumbs up if it does :)

Next Video:

Social
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Tiktok: @vickysdailystandup

Music Credits:
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Рекомендации по теме
Комментарии
Автор

That was a nice n concise explanation... thanks!!!... Subscribed...!

himanshu
Автор

💜️ I really likes your videos. Keep it up 😊

Ricosdiary
Автор

Amazing video. Thanks for share your knowledge!

jakasrodrix
Автор

Nice video but I think I got confused around 0.35 when you say the variable of the outer function is accessible to the "outer function" again? Or maybe I didn't hear well.

abbasloda
Автор

You and your videos are great love you so much. 💚

coderloader
Автор

Can you make a vídeo explaining the differences between computer enginnering and computer science?

Sorry form my english, its bad

agustincilla