给this添加属性

 

const f =()=>{
console.log(this)
let a=5
console.log(this)

console.log(this)
this.ak =3
}

f()

 

let a ={}

a['k'] =3

 

posted @ 2018-09-08 15:54  papering  阅读(313)  评论(0编辑  收藏  举报