title: inspecting javascript arrays
body: <p>In PHP I can loop through an array with a foreach as loop to examine the contents of the array</p>
  
  <pre><code>$array = array(...);
  foreach($array as $K=&gt;$V){
      echo $K." = ".$V;
  }
  </code></pre>
  
  <p>I would like to do something similar to inspect my javascript array</p>
  
  <pre><code>var array = new Array();
  foreach(array ...){
      window.alert(...);
  }
  </code></pre>
  
  <p>how can I do this?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I should have noted that I need both the <strong>keyname</strong> AND the value</p>
  
  <p><strong>EDIT AGAIN</strong></p>
  
  <pre><code>var $_SESSION = new Array();
  $_SESSION['pin'] = "asdf";
  $_SESSION['something'] = "1234";
  $_SESSION['something_else'] = "123";
  </code></pre>
  
  <p>here's an example of my array^</p>