en.javascript.info/1-js/4-object-basics/05-constructor-new/3-accumulator/_js.view/solution.js
Ilya Kantor 4c531b5ae7 ok
2016-07-31 00:28:27 +03:00

8 lines
No EOL
182 B
JavaScript

function Accumulator(startingValue) {
this.value = startingValue;
this.read = function() {
this.value += +prompt('Сколько добавлять будем?', 0);
};
}