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?
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
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
Awesome..............tq
Thank you
Teaching awesome mam......🎈
Thank you
very good explanation, but what will happend when we we run counter2() at the end after counter3?
Thank you,it will be +1 to the previous counter2() result
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?
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
madam logic ela build cheyalo oka video chey ra plz..
Ok I will try,You should understand the requirement clearly to create logic for anything
6:25 res value ni print cheysinapudu full inner function vachindi but outer function loo unna variable var x = 10 enduku print avaledhu ?
Outer function lo direct ga console statement ledu ,it's in inner function
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
Doubt, Idanta cheydamkante outer function lo nunchi var x return chesi "console.log(outer())" ani execute cheste aypodi ga?
function outer(){
var x = 10;
return x;
}
console.log(outer());
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
medam a scope of varibles ina kuda dani scope bayata access chesukovadiki use chesedi kada closers amte?
correct mi if i am wrong?
Yes
At 3:10 daggara inner lo console.log (x) ani rasina output print avvatledu
Adi inner function definition lo rasam ,inner function call chestunapudu print avutundi
At 3:56 outer ane function nee call cheyakapote error choopinchatledu
I will check & reply to your questions on weekend
Closure:- inner() func lo outer() func variables use chesthey dhanni manam closure antam lekapothey it's not a closure
Not just using ,if you are accessing that outside function variables after its execution finished then it's because of closure
madam event listener lo use chesina functionname ki arrow function work avada madam?
You can use
@@csworldtelugu ok tq ma'am
@@narayana2100 👍
mam
which notes will get mam for Get notes per month plan.
Html,css ,JS requested topics
@@csworldtelugu react js is available mam i sent an mail pls check it.
@@venkatn6114 not available now
Sister e closure concept angular lo support chesthundha..chesthe Ela ? Oka example video cheyyara?
Same js lo lagane
Sis real time loo javascript loo m topics akkuva use chestharu
Functions,loops, variables,objects,arrays,dom manipulation ....
Mam Java script Notes Provide chestara please.
Send email to csworlddoubts@gmail.com
@@csworldtelugu ok
miku closer function vachinchi output but maku ouput raledhu entha try chesina
Means any error getting?
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();
its not working
pleas help me
Give input type =button,
Declare count outside the function
@@csworldtelugu thanks
Me voice clarity ledhu
Oh sorry initial videos has voice problem