Closures in Javascript
What is a closure?
A closure is a javascript function that can access the scope of its surrounding state (lexical environment).
Eg:
const a = "HEHEH"
function print(){
const b = a + " Siuuuu" // a is outside the scope of the function but is still...
techbyakash.hashnode.dev2 min read
Avinendra Kumar Singh
Nice explanation ✨