ECMAScript 6新增了箭头函数
原来的匿名函数 function(){},现在可以简化成()=>{}
看起来高大上,像C#什么的语法。
但是箭头函数的this对象,不能更改,总是指向函数定义生效时所在的对象。
如果用在jQuery的事件处理,就会导致this指向意想不到的元素,比如全局的window