this.arrMethods = [{
met: '+',
getResult(str) {
return +str[0] this.met +str[1];
},
}];
switch(operator) {
case '+': return val1 + val2;
case '*': return val1 * val2;
// ....
}
getResult(str) {
return calc(+str[0], +str[1], this.met);
},