title: Explanation for in loop javascript
body: <p>I'm having trouble understanding the way this <strong>for in</strong> loop works. </p>
  
  <pre><code>function createSimpleNode(name, options, text) {
           var node = document.createElement(name); 
  
          for (var o in options) { 
                   node.setAttribute(o, options[o]);
          }
  
          if (text) { 
                  node.innerHTML = text;
          }
  
          return node; 
  }
  </code></pre>