up
This commit is contained in:
parent
d7d25f4d8b
commit
20784e7f26
48 changed files with 302 additions and 397 deletions
|
@ -5,14 +5,13 @@ function Accumulator(startingValue) {
|
|||
this.value = startingValue;
|
||||
|
||||
this.read = function() {
|
||||
this.value += +prompt('Сколько добавлять будем?', 0);
|
||||
this.value += +prompt('How much to add?', 0);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
var accumulator = new Accumulator(1);
|
||||
let accumulator = new Accumulator(1);
|
||||
accumulator.read();
|
||||
accumulator.read();
|
||||
alert( accumulator.value );
|
||||
alert(accumulator.value);
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue