title: Access previous key/value in for-in loop
body: <p>I am new to javascript so please excuse me if its something obvious.</p>
  
  <p>Lets say I have a for-in loop as follows...</p>
  
  <pre><code>for( var key in myObj ){
  
     alert("key :" + myObj[key] ); // accessing current key-value pair
  
     //how do I access previous element here?
  }
  </code></pre>
  
  <p>Is it possible to access previous or next key/value pair in for-in loop?</p>