Closure in JavaScript| JavaScript Closures | Closure in JavaScript with Example| JavaScript |Closure

Поділитися
Вставка
  • Опубліковано 1 лют 2025

КОМЕНТАРІ • 48

  • @dineshm-e3f
    @dineshm-e3f 2 місяці тому +1

    Awesome..............tq

  • @vamsiboddu-qu3yi
    @vamsiboddu-qu3yi 2 роки тому +2

    Teaching awesome mam......🎈

  • @MithunKalvala6
    @MithunKalvala6 2 місяці тому +1

    very good explanation, but what will happend when we we run counter2() at the end after counter3?

    • @csworldtelugu
      @csworldtelugu  2 місяці тому

      Thank you,it will be +1 to the previous counter2() result

  • @ayyappareddy4461
    @ayyappareddy4461 Рік тому +4

    Mam will you please tell me How count previous value is stored each time while calling the function each time even though the count value is initialized as 0 , count=0 in line number 18,is it similar like static variable in java ,I mean each time count is changing to 1 ,2 ,3 ,4 ,5 even though outside function count =0 initialized ,How it is taking previous incremented count value?

    • @csworldtelugu
      @csworldtelugu  Рік тому

      If count is declared inside function ,its value is initiated newly every time function called different variable created , But declared out side means every time function calling uses the same variable

  • @thunderboysshortflims3109
    @thunderboysshortflims3109 Рік тому +1

    madam logic ela build cheyalo oka video chey ra plz..

    • @csworldtelugu
      @csworldtelugu  Рік тому +1

      Ok I will try,You should understand the requirement clearly to create logic for anything

  • @avinash4007-o1l
    @avinash4007-o1l Рік тому +1

    6:25 res value ni print cheysinapudu full inner function vachindi but outer function loo unna variable var x = 10 enduku print avaledhu ?

    • @csworldtelugu
      @csworldtelugu  Рік тому +3

      Outer function lo direct ga console statement ledu ,it's in inner function

    • @danl8994
      @danl8994 7 місяців тому +1

      Manam return inner type chesam kaabatti entire function return ayyi outer() lo store avvudhi. Kaani return chesina function lo em unna sare avi execute avvav endukante manam execute cheyyatle.. but outer() ni function expression la oka variable lo store chesi call chesthe appudu inner () lo unna print statement print avvudhi. Idhe closure ante.... Function lo unna members ni bayata access cheyyadaniki use avvudhi.
      Closure anedhi oka bundle of a function and it's lexical environment

  • @pallapunarsimlu9412
    @pallapunarsimlu9412 Рік тому

    Doubt, Idanta cheydamkante outer function lo nunchi var x return chesi "console.log(outer())" ani execute cheste aypodi ga?

    • @pallapunarsimlu9412
      @pallapunarsimlu9412 Рік тому

      function outer(){
      var x = 10;
      return x;
      }
      console.log(outer());

    • @csworldtelugu
      @csworldtelugu  Рік тому +1

      E concept anedi manuaku oka function already completed,later at some time if you want to use that data in some of its nested function

  • @bhavanisankar7588
    @bhavanisankar7588 Рік тому +1

    medam a scope of varibles ina kuda dani scope bayata access chesukovadiki use chesedi kada closers amte?
    correct mi if i am wrong?

  • @mukkalanagaraju5184
    @mukkalanagaraju5184 6 місяців тому +1

    At 3:10 daggara inner lo console.log (x) ani rasina output print avvatledu

    • @csworldtelugu
      @csworldtelugu  6 місяців тому

      Adi inner function definition lo rasam ,inner function call chestunapudu print avutundi

  • @mukkalanagaraju5184
    @mukkalanagaraju5184 6 місяців тому +1

    At 3:56 outer ane function nee call cheyakapote error choopinchatledu

    • @csworldtelugu
      @csworldtelugu  6 місяців тому

      I will check & reply to your questions on weekend

  • @Sai-uz1oz
    @Sai-uz1oz 11 місяців тому +1

    Closure:- inner() func lo outer() func variables use chesthey dhanni manam closure antam lekapothey it's not a closure

    • @csworldtelugu
      @csworldtelugu  11 місяців тому +3

      Not just using ,if you are accessing that outside function variables after its execution finished then it's because of closure

  • @narayana2100
    @narayana2100 11 місяців тому +1

    madam event listener lo use chesina functionname ki arrow function work avada madam?

  • @venkatn6114
    @venkatn6114 2 роки тому +1

    mam
    which notes will get mam for Get notes per month plan.

    • @csworldtelugu
      @csworldtelugu  2 роки тому +1

      Html,css ,JS requested topics

    • @venkatn6114
      @venkatn6114 2 роки тому +1

      @@csworldtelugu react js is available mam i sent an mail pls check it.

    • @csworldtelugu
      @csworldtelugu  2 роки тому +1

      @@venkatn6114 not available now

  • @SirishaKEce-C
    @SirishaKEce-C 2 роки тому +1

    Sister e closure concept angular lo support chesthundha..chesthe Ela ? Oka example video cheyyara?

  • @kasamharish1389
    @kasamharish1389 Рік тому +1

    Sis real time loo javascript loo m topics akkuva use chestharu

    • @csworldtelugu
      @csworldtelugu  Рік тому

      Functions,loops, variables,objects,arrays,dom manipulation ....

  • @ramakrishnabikkanoor3192
    @ramakrishnabikkanoor3192 9 місяців тому +1

    Mam Java script Notes Provide chestara please.

  • @rajugunnabattula
    @rajugunnabattula Рік тому +1

    miku closer function vachinchi output but maku ouput raledhu entha try chesina

  • @letsknowit5294
    @letsknowit5294 2 роки тому

    Clicked:0


    function updatecpont(){
    let count=0;
    console.log(count)
    function inner(){
    count = count+1;
    document.getElementById("para").innerText=`clicked ${count}`
    console.log(count)
    }
    return inner()

    }
    updatecpont();

  • @amrcreation4012
    @amrcreation4012 Рік тому +1

    Me voice clarity ledhu