Refer to the code below:
function foo () {
const a =2;
function bat() {
console.log(a);
}
return bar;
Why does the function bar have access to variable a ?
Limited Time Offer
25%
Off
Currently there are no comments in this discussion, be the first to comment!
Currently there are no comments in this discussion, be the first to comment!