why the x before +"the number is"
<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;body&gt;

&lt;p&gt;Click the button to loop through a block of code five times.&lt;/p&gt;
&lt;button onclick="myFunction()"&gt;Try it&lt;/button&gt;
&lt;p id="demo"&gt;&lt;/p&gt;

&lt;script&gt;
function myFunction() {
  var x = "";
  for ( var i = 0; i &lt; 5; i++ ) {
      x = x + "The number is " + i + "&lt;br&gt;";
  }
  document.getElementById("demo").innerHTML=x;
}
&lt;/script&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>I understand what it returns but I don't understand the x before each statement.</p>

<pre><code>x = x + "The number is " + i + "&lt;br&gt;";
</code></pre>
