function ppp(){ var a = 2; sss = function(){ console.log(a); } } ppp(); sss();
这里能打印2感觉很神奇,因为2在ppp函数作用域里面,sss在外面执行竟然能拿到值
数据分析师2017-10-01 01:09:30
A question about js? -PHP Chinese website Q&A-A question about js? -PHP Chinese website Q&A
Let’s take a look and learn.