myDiv.innerHTML += "Request status: 1 (loading) <br/>";
is actually equal to:
myDiv.innerHTML = myDiv.innerHTML + "Request status: 1 (loading) <br/>";
+= means: take the value of the variable on the left, add (or when you are talking about strings, concatenate) the value on the right to it, and then load it back to the variable on the left.
For example, they have a quite nice table on explaining what these shorthand assignment operators like
+= do, might have helped you a lot.
It is adding the text to the element called myDiv. Is like writing the text between the
Uses += because he wants to append the text instead of replacing it. Upon your code, it will go writing the different request statuses as they happen.
I'm assuming the
<div id="myDivElement" /> in your html code.
If there was html content inside of
<div id="myDivElement">....</div>, the