0
点赞
收藏
分享

微信扫一扫

前端学习笔记202310学习笔记第一百壹拾天-作用域&作用域链&预编译&闭包基础6

a=1
function test(e){
    function e(){}
    arguments[0]=2
    console.log(e)
    if(a){
        var b=3
    }
    var c;
    a=4;
    var a;
    console.log(b)
    f=5
    console.log(c)
    console.log(a)
}
var a;
test(1)
console.log(a)
console.log(f)
//GO{
//  a:undefined-->1
//   test:function test(){}
//   f:5
//}
//AO{
//   e:undefined---->1---->function e(){}--->2
//   b:undefined
//   c:undefined
//   a:undefined---->4
//}

运行结果

前端学习笔记202310学习笔记第一百壹拾天-作用域&作用域链&预编译&闭包基础6_clementine



举报

相关推荐

0 条评论