ᅠ
class Test {
getVal() {
return 22;
}
checkMethod() {...}
}
Size: a a a
ᅠ
class Test {
getVal() {
return 22;
}
checkMethod() {...}
}
ᅠ
ᅠ
class Test {
getVal() {
return 22;
}
checkMethod() {...}
}
ᅠ
class Test {
getVal() {
return 22;
}
}
Test.prototype.checkMethod = () => {
console.log(this.getVal());
}
UT
let m = () => {
console.log(this.getVal());
}
class Test {
getVal() {
return 22;
}
checkMethod = m
}
let m = () => {
console.log(this.getVal());
}
class Test {
getVal() {
return 22;
}
constructor(){
this.checkMethod = m;
}
}
ᅠ
let m = () => {
console.log(this.getVal());
}
class Test {
getVal() {
return 22;
}
constructor(){
this.checkMethod = m;
}
}
ᅠ
let m = () => {
console.log(this.getVal());
}
class Test {
getVal() {
return 22;
}
constructor(){
this.checkMethod = m;
}
}
function a(){от
return []
}
let x = []
function a(){
return x
}
UT
ᅠ
let m = function() {
console.log(this.getVal());
}
class Test {
getVal() {
return 22;
}
constructor(){
this.checkMethod = m;
}
}
UT
UT
let m = function() {
console.log(this.getVal());
}
class Test {
getVal() {
return 22;
}
constructor(){
this.checkMethod = m;
}
}
ᅠ
UT
let func = new Test().checkMethod;
func();
ᅠ
let func = new Test().checkMethod;
func();
ᅠ
UT
U
U
MB