function Accumulator(val) {
this.read = function () {
this.num = +prompt("Enter num:", 0);
};
this.value = val + this.num;
console.log(typeof this.value);
}
let accumulator = new Accumulator(1);
accumulator.read();
alert(accumulator.value);
console.log(accumulator);
Вопрос: Почему значение value у меня NaN, хотя, если я просматриваю тип value, то мне пишет тип - number у value. Это как вообще возможно, NotANumber и при этом number??