이 this
객체 메소드를 참조 할 때 변수에 저장해야합니까? (자바 스크립트) 나는 자바 스크립트를 참조
var myObj = {
method1 : function() {},
method2 : function() {},
method3 : function {},
init : function() {
this.method1();
this.method2();
this.method3();
}
};
사용하여 오브젝트를 여러 번 성능 향상의 어떤 종류가 있습니까 나는 변수에 this
저장해야? 마찬가지로 :
init : function() {
var self = this;
self.method1();
self.method2();
self.method3();
}
아니요 ............. –
'자기'의 사용을 분명히 오해하고 있습니다. – Alexander
설명해 주실 수 있습니까? – Maverick