Tell us what’s happening:
var result = “”;
result+= " *strings + variables here* ";
I understand that the first line initializes the variable result. In the second line, this one is assigned a value (a sentence made out of strings and variables).
My question: why is it used += instead of just = in the solution? I can’t see the advantage of it.
Your browser information:
User Agent is:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36.