Refer to the codebelow:
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
Dana
2 days agoHuey
10 days agoChara
11 days agoSvetlana
18 days agoTyisha
19 days agoSvetlana
23 days ago