//箭头函数
var fn1 =()=>{
console.log(arguments)//arguments is not defined}fn1(100,200,300)//普通函数
var fn2 =function(){
console.log(arguments)//正确}fn2(100,200,300)
箭头函数没有this 箭头函数内的this就是外部作用域的this
var obj ={
fn:function(){console.log(this)},
fn2:()=>{console.log(this)}}
obj.fn()//this因为fn函数被obj调用,所以this是obj
obj.fn2()//因为是箭头函数,内部没有this,就是外部作用域的this(window)