js变量作用域

1.

var c = 1;
function a () {
    var c =1;
    c = c+2;
    console.log('fn : '+c)
};
a();//3
console.log( c) //1

原文地址:https://www.cnblogs.com/qiyc/p/11253806.html