closes #2937
This commit is contained in:
parent
094b15b505
commit
c49b104d23
1 changed files with 1 additions and 2 deletions
|
@ -6,7 +6,7 @@ importance: 5
|
|||
|
||||
Create an object `calculator` with three methods:
|
||||
|
||||
- `read()` prompts for two values and saves them as object properties.
|
||||
- `read()` prompts for two values and saves them as object properties with names `a` and `b` respectively.
|
||||
- `sum()` returns the sum of saved values.
|
||||
- `mul()` multiplies saved values and returns the result.
|
||||
|
||||
|
@ -21,4 +21,3 @@ alert( calculator.mul() );
|
|||
```
|
||||
|
||||
[demo]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue