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