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

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ต.ค. 2024
  • 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

  • @CodeWithJamil786
    @CodeWithJamil786 ปีที่แล้ว +3

    Hello Nisha mam really your explaination are awesome. How we can use Closure in angular please make video on it

  • @suvigyabasnotra7378
    @suvigyabasnotra7378 ปีที่แล้ว

    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.

  • @dilipdwiveedi1611
    @dilipdwiveedi1611 2 ปีที่แล้ว +3

    Dear Nisha please create more videos on Reactjs on Hooks...As React is latest in demand in IT Industry

  • @Saadhya-p8o
    @Saadhya-p8o 9 หลายเดือนก่อน

    I am not able to run for loop , also product length is 0 , please help

  • @dharmeshsinha106
    @dharmeshsinha106 2 ปีที่แล้ว +1

    mam... make a playlist of javascript which concepts is needed for angular undestandable for begginers...who want to initiate work in IT industry.

  • @RohanMirajkar-j6b
    @RohanMirajkar-j6b ปีที่แล้ว

    online code editor font name please...

  • @user-qy3kc5wb2b
    @user-qy3kc5wb2b 2 ปีที่แล้ว +1

    Upor upor chala gaya kuch smjh nai aaya

  • @sreedhar333
    @sreedhar333 2 ปีที่แล้ว

    if you continue to do the same work for somemore time .....you win youtube play buttons...Advance congratulations....

  • @TheTruRavi
    @TheTruRavi 2 ปีที่แล้ว

    Hi Nisha,
    Can you send pls make video with GIT command?
    Thanks

  • @PremKumar-ky5zl
    @PremKumar-ky5zl ปีที่แล้ว

    Finally, I understand closures. Thank you💌

  • @nanasarathi
    @nanasarathi 2 ปีที่แล้ว

    Very informative 👍 Very clear 👍 thanks for sharing this video 🙏

  • @pranitingole5562
    @pranitingole5562 2 ปีที่แล้ว

    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 . 🙂

  • @hi-yi7en
    @hi-yi7en 2 ปีที่แล้ว

    Call back fun in eventlisteners also having closures

  • @naveenvanka6076
    @naveenvanka6076 2 ปีที่แล้ว

    Nisha please create videos on rxjs operators for interview purpose

  • @Gimmiyimmy
    @Gimmiyimmy 2 ปีที่แล้ว

    very well explained . thank you

  • @sreedhar333
    @sreedhar333 2 ปีที่แล้ว

    Hi Nisha....fantastic explanation.....thanks ....

  • @kumar_awadhesh
    @kumar_awadhesh 2 ปีที่แล้ว

    Nice tutorial.... Thank you

  • @raj.blazers
    @raj.blazers 2 ปีที่แล้ว

    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 2 ปีที่แล้ว

      Even I think where call,apply and bind methods are used these days.....(apart from interview qns)

  • @RahulRaj-on8js
    @RahulRaj-on8js ปีที่แล้ว

    awesome explanation 💯

  • @akiratoriyama1320
    @akiratoriyama1320 2 ปีที่แล้ว

    Thank you very much!!

  • @deepbpatel2183
    @deepbpatel2183 2 ปีที่แล้ว

    simply brilliant.

  • @isratjabin9063
    @isratjabin9063 2 ปีที่แล้ว

    Best explanation

  • @sarath2873
    @sarath2873 2 ปีที่แล้ว

    Thank you