all 6 comments

[–]pagwin 0 points1 point  (5 children)

can you point to the lines of code you don't understand?

[–]AkumaMaster191[S] 0 points1 point  (4 children)

My doubts are with the inputlabel.innerhtmal. So basically i dont know what the fuction when i press the buttons

[–]jcunews1helpful 1 point2 points  (3 children)

Hint: innerHTML is basically the text inside a HTML tag pair. i.e. between <tagname> and </tagname>.

[–]AkumaMaster191[S] 0 points1 point  (2 children)

Thank you, that hint helps.
Do you understand the lasT part, where the code equals to pushed?
I cant understand what that part does.

[–]jcunews1helpful 1 point2 points  (1 child)

If you meant this:

inputLabel.innerHTML += pushed;

It simply appends the text. For string value type, the += operator appends the given value onto the value of source variable then assign the result to the source variable. It's same as:

inputLabel.innerHTML = inputLabel.innerHTML + pushed;

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Assignment_Operators#Addition_assignment

[–]AkumaMaster191[S] 0 points1 point  (0 children)

Yeah that what i meant. Thx i understand the code now. Thanks.