title: javascript - is an alert in a for-loop possible
body: <p>Is writing an for-loop in an alert-statement possible?</p>
  
  <p>Closer look to problem:
  If I want to print the content of an array in one alert-statement. I am wondering if this is even possible.</p>
  
  <p>an array : </p>
  
  <pre><code>myArray["a1", "a2", "a3", "a4"]
  </code></pre>
  
  <p>Printing something like following with/in just one alert-statement:</p>
  
  <pre><code>Here your great content of myArray: 
  a1 
  a2 
  a3 
  a4
  </code></pre>
  
  <p>I am thinking about something like that:</p>
  
  <pre><code>alert("
  Here your great content of myArray:\n" +
  
  for (var i = 0; i &lt; myArray.length; i++) {
       myArray[i] + "\n";
  }
  
  );
  </code></pre>
  
  <p>Whereas of course it does not work .., but I kind of got stuck. Hope for constructive help, even if it might seem to be a silly question at first look.</p>
  
  <p>Thanks in advance</p>