作用域
function a(){
function b(){
var b=234;
a=0;
}
var a=123;
b();
console.log(a); //a=0
}
var glob=100;
a();
//a defined a.[[scope]]-->0:GO{}
//a doing a.[[scope]]-->0:GO{}
// 1:GO{}
function a(){
function b(){
function c(){
}
c();
}
b();
}
a();
//a defined a .[[scope]]-->0:GO
//a doing a.[[scope]]-->0:aAo
// 1:GO
//b definde b.[[scope]]-->0:aAO
// 1:GO
//b doing b.[[scope]]-->0:bAO
// 1:aAO
// 2:GO
//c defined c.[[scope]] -->0:bAO
// 1:aAO
// 2:GO
//c doing c.[[scope]]-->0:cAO
// 1:bAO
// 2:aAO
// 3:GO
博客提及了作用域这一信息技术概念,作用域在编程中是重要的基础内容,它规定了变量和函数的可访问范围。

被折叠的 条评论
为什么被折叠?



