var a1=1,a2=2,a3=3;
var a1=1;var a2=2;var a3=3;
上面2中都是定义3个变量,有何区别吗,比如性能方面。。
大家讲道理2017-04-10 16:34:20
基本没差别,实践上后者更好
http://danhough.com/blog/single-var-pattern-rant/
var statements via MDN:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/var