title: Array will not output in div
body: <p>SOLVED!
  I am trying to output my array values in a div on my website.
  But it only write the last element in the array. In the console it write all the values in right order etc. But it will not show on the website. 
  This is my code:</p>
  
  <pre><code>var temp_array = [''];
  var filename = [
          'Teknisk Broschyr 35A',
          'Teknisk Data 35A',
          'Drift och skötsel 35A',
          'Mått och montering 35A',
          'Elschema 35A'
          ];
  function writename(checkboxElem, id){
          var compare = id;
          if(checkboxElem.checked)
          {
              temp_array.push(filename[compare]);
          }
          else{
              var index = temp_array.indexOf(filename[compare]);
              if (index &gt; -1) {
                  temp_array.splice(index, 1);
              }
          }
          document.getElementById("demo").innerHTML = "";
          for(i = 0; i &lt; temp_array.length; i++)
          {
              //console.log(temp_array.length);
              console.log(temp_array[i]);
              document.getElementById("demo").innerHTML += temp_array[i];
          }
      }
  </code></pre>
  
  <p>Thankfull for help.</p>