innerHTML = str vs innerHTML = array

Edit on GitHub

just testing

Setup

Tests

  • innerHTML = str

    var html = [];
    html.push("<div><h1>hello</h1></div>");
    document.innerHTML = html.join("");
  • innerHTML = array

    var html = "<div><h1>hello</h1></div>";
    document.innerHTML = html;