We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c28563b + 3b71f76 commit f983992Copy full SHA for f983992
1 file changed
1-js/05-data-types/05-array-methods/6-calculator-extendable/_js.view/solution.js
@@ -10,14 +10,14 @@ function Calculator() {
10
let split = str.split(' '),
11
a = +split[0],
12
op = split[1],
13
- b = +split[2]
+ b = +split[2];
14
15
if (!this.methods[op] || isNaN(a) || isNaN(b)) {
16
return NaN;
17
}
18
19
return this.methods[op](a, b);
20
- }
+ };
21
22
this.addMethod = function(name, func) {
23
this.methods[name] = func;
0 commit comments