Skip to content

Commit b633b6c

Browse files
authored
Merge pull request #464 from upupming-site/master
Fixed: function name not match
2 parents dad2d80 + a45492a commit b633b6c

File tree

1 file changed

+1
-1
lines changed
  • 1-js/04-object-basics/06-constructor-new/4-calculator-extendable

1 file changed

+1
-1
lines changed

1-js/04-object-basics/06-constructor-new/4-calculator-extendable/task.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The task consists of two parts.
1717

1818
alert( calc.calculate("3 + 7") ); // 10
1919
```
20-
2. Then add the method `addOperator(name, func)` that teaches the calculator a new operation. It takes the operator `name` and the two-argument function `func(a,b)` that implements it.
20+
2. Then add the method `addMethod(name, func)` that teaches the calculator a new operation. It takes the operator `name` and the two-argument function `func(a,b)` that implements it.
2121

2222
For instance, let's add the multiplication `*`, division `/` and power `**`:
2323

0 commit comments

Comments
 (0)