Frontend Interview Question | What are Closures? | Closures| Javascript Interview

  Рет қаралды 11,444

Nisha Singla

Nisha Singla

2 жыл бұрын

Hi Everyone
Closures are one of the important concept in Javascript and one of the asked Interview Question during technical discussion. Closures are must to learn concept if you are preparing for your javascript interview or working as senior developer as it will help you to write more organised code.
Watch the complete video till the end to understand it completely.
Along with Closures, we have also talk about lexical scope, scope and IIFE functions in javascript.
What is Lexical Scope?
A lexical scope in JavaScript means that a variable defined outside a function can be accessible inside another function defined after the variable declaration. But the opposite is not true; the variables defined inside a function will not be accessible outside that function.
What is Closures
In JavaScript, a closure is a function that references variables in the outer scope from its inner scope.
The closure preserves the outer scope inside its inner scope even after outer function is returned.
What is IIFE?
An IIFE (Immediately Invoked Function Expression) is a JavaScript function that runs as soon as it is defined.
It is a design pattern which is also known as a Self-Executing Anonymous Function
Check another important interview Question
• Frontend Interview Que...
Check video on Recursion
• What is Recursion | Ja...
Support my channel by liking and sharing my videos so that I can reach to wider audience. Please share it in your network 🙏
Connect with me on social platform:
Facebook: / angularjs4beginners
LinkedIn: / nisha-singla-82407aa0
Instagram : / nishasingla05
Twitter: / nishasingla05
For more such interesting videos, please subscribe to my channel and stay connected.
#Closures #frontEndInterview #JavascriptInterview

Пікірлер: 24
@nanasarathi
@nanasarathi Жыл бұрын
Very informative 👍 Very clear 👍 thanks for sharing this video 🙏
@PremKumar-ky5zl
@PremKumar-ky5zl 11 ай бұрын
Finally, I understand closures. Thank you💌
@deepbpatel2183
@deepbpatel2183 Жыл бұрын
simply brilliant.
@CodeWithJamil786
@CodeWithJamil786 Жыл бұрын
Hello Nisha mam really your explaination are awesome. How we can use Closure in angular please make video on it
@Gimmiyimmy
@Gimmiyimmy Жыл бұрын
very well explained . thank you
@kumar_awadhesh
@kumar_awadhesh 2 жыл бұрын
Nice tutorial.... Thank you
@isratjabin9063
@isratjabin9063 Жыл бұрын
Best explanation
@pranitingole5562
@pranitingole5562 Жыл бұрын
Hello nisha mam, I follow you on Instagram I see your all content, that shows how deep knowledge you have , thanks for your valuable knowledge . 🙂
@akiratoriyama1320
@akiratoriyama1320 2 жыл бұрын
Thank you very much!!
@sreedhar333
@sreedhar333 2 жыл бұрын
Hi Nisha....fantastic explanation.....thanks ....
@RahulRaj-on8js
@RahulRaj-on8js 10 ай бұрын
awesome explanation 💯
@sreedhar333
@sreedhar333 2 жыл бұрын
if you continue to do the same work for somemore time .....you win youtube play buttons...Advance congratulations....
@dilipdwiveedi1611
@dilipdwiveedi1611 2 жыл бұрын
Dear Nisha please create more videos on Reactjs on Hooks...As React is latest in demand in IT Industry
@sarath2873
@sarath2873 2 жыл бұрын
Thank you
@hi-yi7en
@hi-yi7en 2 жыл бұрын
Call back fun in eventlisteners also having closures
@dharmeshsinha106
@dharmeshsinha106 2 жыл бұрын
mam... make a playlist of javascript which concepts is needed for angular undestandable for begginers...who want to initiate work in IT industry.
@TheTruRavi
@TheTruRavi 2 жыл бұрын
Hi Nisha, Can you send pls make video with GIT command? Thanks
@naveenvanka6076
@naveenvanka6076 2 жыл бұрын
Nisha please create videos on rxjs operators for interview purpose
@raj.blazers
@raj.blazers Жыл бұрын
Hi Nisha, Now that we have front end frameworks like Angular or even Javascript es6 classes can provide variable scope/private variables(not polluted) ,do closures still have importance?
@raj.blazers
@raj.blazers Жыл бұрын
Even I think where call,apply and bind methods are used these days.....(apart from interview qns)
@user-qe1sh7nf7o
@user-qe1sh7nf7o 6 ай бұрын
I am not able to run for loop , also product length is 0 , please help
@user-qv4je3he5k
@user-qv4je3he5k Жыл бұрын
online code editor font name please...
@suvigyabasnotra7378
@suvigyabasnotra7378 11 ай бұрын
Good explanation. Not great! Please use English properly. Was listening very carefully, but at same places you used variable instead of function and vice-versa or just mixed them, which caused confusion. The playlist idea is very nicely put through though.
@user-qy3kc5wb2b
@user-qy3kc5wb2b Жыл бұрын
Upor upor chala gaya kuch smjh nai aaya
What is Recursion | Javascript | Real World Examples
26:35
Nisha Singla
Рет қаралды 12 М.
🤔Какой Орган самый длинный ? #shorts
00:42
Вечный ДВИГАТЕЛЬ!⚙️ #shorts
00:27
Гараж 54
Рет қаралды 14 МЛН
Best KFC Homemade For My Son #cooking #shorts
00:58
BANKII
Рет қаралды 14 МЛН
THE POLICE TAKES ME! feat @PANDAGIRLOFFICIAL #shorts
00:31
PANDA BOI
Рет қаралды 25 МЛН
5 Essential JavaScript Interview Questions
20:32
Coding With Chaim
Рет қаралды 90 М.
Lexical scoping and Closure | chai aur #javascript
26:48
Chai aur Code
Рет қаралды 73 М.
Closure in Javascript
14:55
Piyush Garg
Рет қаралды 19 М.
Javascript interview | Closure
11:44
Hitesh Choudhary
Рет қаралды 35 М.
🤔Какой Орган самый длинный ? #shorts
00:42