asked 166k views
0 votes
Please help explain this calculator code.

var calculator = {
sum: 0,
add: function(value) {
this.sum = this.sum + value;

},
clear: function() {[]
this.sum = 0;

},
equals: function() {
return this.sum;

}
}

asked
User Lawchit
by
8.4k points

1 Answer

3 votes

Answer:

that looks really complicated. Try going to khan academy to get an explanation, they almost always have great explanations for things.

Step-by-step explanation:

answered
User Muhamed Krasniqi
by
7.9k points

No related questions found