Answer the question
In order to leave comments, you need to log in
Is the global object a function too?
There is the following code:
const q = 1;
function outer() {
console.log('outer run')
const w = 2;
return function inner() {
console.log('inner run')
const e = 3;
console.log(q);
}
}
outer()()
inner() -> outer() -> global
Answer the question
In order to leave comments, you need to log in
In general, in JavaScript, all these are objects. Even functions are objects.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question