title: Code execution throws error "object is not a function"
body: <p>When i execute the below code i get the below error.
  uncaught TypeError: object is not a function </p>
  
  <pre><code>    &lt;html&gt;
      &lt;script&gt;
      var obj_1 = {x:1, y:2}
      (function (o)
      {
          for(i in o)
          {
          console.log(i);
          }
      })(obj_1);
  
      &lt;/script&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p>Please explain what causes this error?
  Thanks.</p>