mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-13 06:32:54 +00:00
11 lines
280 B
JavaScript
11 lines
280 B
JavaScript
//I should return `undefined` because y is bound to the inner-most enclosing function, i.e the nested one (bar()), therefore, it's undefined in the scope of foo()
|
|
function foo() {
|
|
function bar() {
|
|
var y = 6;
|
|
}
|
|
|
|
bar();
|
|
return y;
|
|
}
|
|
|
|
console.log(foo());
|