Hi Kaustav welcome to DEV!
It might be good to know that you can format code on here to make it a bit more readable. You can do this using this markdown notation. In that case your closure function at point four would look like this:
functionclosureExample(i){returnfunctioncloureInnerVariable(y){returni+y;}}constvalue1=closureExample(1);constvalue2=value1(2);console.log("value of closure",value2);
Hi Kaustav welcome to DEV!
It might be good to know that you can format code on here to make it a bit more readable. You can do this using this markdown notation. In that case your closure function at point four would look like this:
Thanks for suggesting...i will do that