Refer to the code below: function foo () { const a =2; function bat() { console.

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 ?
A. Inner function’s scope
B. Hoisting
C. Outer function’s scope
D. Prototype chain

Download Printable PDF. VALID exam to help you PASS.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.