title: How to create elements, set attribute, use innerHTML, and appendChild with JS and DOM
body: <p>I am writing a sample program in HTML/JS to demonstrate creating an array of user-defined objects (property/value), creating an element, adding data from the object array using innerHTML, and then appending the newly filled element to print it using appendChild();</p>
  
  <p>For some reason, running the program provides no output besides what I hard-code as debugging. View source is also not very helpful given the language.</p>
  
  <p>Please forgive me for the simple question, I am new to JS and have spent many hours reading many resources - I feel I am probably missing something small.</p>
  
  <p>Thank you!!</p>
  
  <pre><code>&lt;title&gt;
  This is my title.
  &lt;/title&gt;
  
  &lt;body&gt;
  &lt;p&gt;xXx&lt;br/&gt;&lt;/p&gt;
  &lt;script&gt;
  
  var array = new Array();
  
  var thing1 = {
  property: "value-1"
  };
  
          var thing2 = {
          property: "value-2"
          };
  
  
          array.push(thing1);
          array.push(thing2);
  
          for (index = 0; index &lt; array.length; ++index) {
  
              test_el = document.createElement("p");
  
              test_el.innerHTML(array[index].property);
  
              document.body.appendChild(test_el);
  
          };
          //I wish to print 'value' text into the body from my object, that is all
  
  &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>