How to print structured array and push value in array
<p>I am new to JQuery. I am here to learn JQuery fundamentals and serious to know how array works in jQuery.  </p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta content="text/html;charset=utf-8" http-equiv="Content-Type"&gt;
&lt;meta content="utf-8" http-equiv="encoding"&gt;
    &lt;style&gt;
  div { color:blue; }
  span { color:red; }
&lt;/style&gt;
    &lt;script src="jquery-latest.js"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;div id="myDiv"&gt;&lt;/div&gt;

&lt;script&gt;
$(document).ready(function() {

    var testArray = ["test1","test2","test3","test4"];
    var new_array=[];
    var vPool="";

    /*i tried but this pushing code dosen't work*/

   //pushing values in new_array
    $("new_array").push({"test1","test2","test3","test4"});

    //fetching the values of new_array 
    $.each(new_array, function(i, val) {
      vPool+=val + "&lt;br /&gt;";
    });
    $('#myDiv').html(vPool);---&gt;
    //vPool="";

    /*But i tried this code it work fine */

    //fetching the values of new_array 
    $.each(testArray, function(i, val) {
      vPool+=val + "&lt;br /&gt;";
    });
    $('#myDiv').html(vPool); 
    //vPool="";

});
&lt;/script&gt;

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

<p>And I want to know how to print structured array like we print in PHP:</p>

<pre><code>echo "&lt;pre&gt;";
print_r($array);
</code></pre>
