title: Assign object[key] to a temp variable in a javascript "for...in" loop?
body: <p>I'm working on a JS to show different messages depending on the current url's hash.
  Now, that's all working, but I was wondering what the best way would be to access my messages (They'll be coded into a .js file)</p>
  
  <p>At the moment, I have the messages stored in a object like this:</p>
  
  <pre><code>popups = {
      TemplateMessage: {
          title: "Template Popup Title", 
          message: "This is a template popup message! Copy this to add a message.",
          modal: true
      },
      AnotherMessage: {
          title: "another title", 
          message: "message.",
          modal: true
      } /* etc */
  };
  </code></pre>
  
  <p>the way I'm accessing these messages is with a "for in:  loop, as follows:</p>
  
  <pre><code>for (key in popups) {
      //Do something with...
      popups[key].title;
      popups[key].message;
      popups[key].modal;
  }
  </code></pre>
  
  <p>But would it be more efficient to assign popups[key] to a temporary variable?
  Like:</p>
  
  <pre><code>var p;
  for (key in popups) {
      p = popups[key];
      //Do something with...
      p.title;
      p.message;
      p.modal;
  }
  </code></pre>
  
  <p>This is all relatively small-scale at the moment and it wouldn't matter a lot (if anything at all) at this stage, but what if you have, say, 25 different objects with 50 properties on each of them?
  I guess my real question would be, is there a (relatively) significant difference in obtaining a variable from a temp variable, or from a object in a object?</p>
  
  <p>I'm not quite sure how to properly test this, any suggestions?</p>