Closure - The easiest explanation ever possible ๐ช
function x()
{
var a = 10;
function y()
{
console.log( a );
}
y();
}
x();
Here y() will search for the value of 'a' inside its memory unit, if not found, then it will search for its value lexically (lexically simply means...
ashusnapx.hashnode.dev2 min read