How do I add a new Object to a Array, in JavaScript?
<p>How do I add <code>newObject</code> to my array <code>shapeArr</code>? 
Do I need to add a for loop?</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;meta charset="utf-8" /&gt;
        &lt;style type="text/css"&gt;
            ul{ list-style-type:none;}
            div{ width:300px; height:200px; background-color:#0066cc; }
        &lt;/style&gt;    
    &lt;/head&gt;
    &lt;body&gt;
        &lt;ul id="placeholder"&gt;&lt;/ul&gt;
        &lt;a href="#" id="btn"&gt;Add&lt;/a&gt;

        &lt;script type="text/javascript"&gt;

            function add(){

                function draw(){

                    var template = document.createElement("li");
                    template.innerHTML = "&lt;div&gt;&lt;/div&gt;&lt;a href='#' class='update'&gt;Update&lt;/a&gt;";                

                    document.getElementById("placeholder").appendChild(template);
                }

                var newObject = new draw();

                var shapeArr = [];

            }

            var btn = document.getElementById("btn");
            btn.addEventListener("click", add, false);

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