ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 95 - Certified JavaScript Developer I discussion

Report
Export

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
Answers
A.
Inner function's scope
B.
Hoisting
Answers
B.
Hoisting
C.
Outer function's scope
Answers
C.
Outer function's scope
D.
Prototype chain
Answers
D.
Prototype chain
Suggested answer: C
asked 23/09/2024
mahdis khaledi
46 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first