摘要: 1 //1. 2 function f1(){ 3 console.log(num);//undefined 4 var num=10; 5 } 6 f1(); 7 conosle.log(num);//报错 说明num变量的提升只在当前的作用域中提升,提前到当前的作用域的最上面 8 //函数里的变 阅读全文
posted @ 2020-09-15 13:35 _KKcoding 阅读(133) 评论(0) 推荐(0) 编辑