摘要:
现在最先的行为准则:js变量申明必须带var;然后开始随笔:函数中的变量申明在编译的时候都会提到函数开头。例如:1 function foo(){2 console.log('some code here');3 var a=1;4 console.log('other code here');5 }实际上等价于:1 function foo(){2 var a;3 console.log('some code here');4 a=1;5 console.log('other code here');6 }另外一点补充,关于函数 阅读全文
posted @ 2014-04-01 10:59
zephor
阅读(483)
评论(0)
推荐(0)