[javascript] this

o = {'var1':1, 'var2':2, f = () => { console.log(this.var1)};
// this는 자기자신이 속해있는 객체 이름을 돌려줍니다.
o.f();

댓글

Designed by JB FACTORY