KA
constructor() {
this.fun1 = null;
this.fun2 = null;
}
selectFunc(func) {
switch (func) {
case "fun1": {
if (this.fun1) {
return this.fun1;
}
}
case "fun2": {
if (this.fun2) {
return this.fun2;
}
}
}
}
changeFunc(func) {
const thisFunc = this.selectFunc(func);
thisFunc = () => console.log(
TEST
);}
useFunc(func) {
const thisFunc = this.selectFunc(func);
thisFunc();
}
}