ES2015(以下简称ES6)在开发过程中遇到的问题:
1,必须显示声明变量
//es5中可解释为全局变量 a=5; //es6中报错:a is not defined a=5
2,对于递归调用方式必须采用显式调用
//es5,匿名函数自调用 function(){ arguments.callee(); } //es6,报错 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the a //修改:不再使用callee() function recursionFn(){ //显式调用 recursionFn(); }