title: typeof of an object property (number) on passing to IIFE is returning undefined. Why?
body: <p>How in the world the output is not number?</p>
  
  <ul>
  <li>There is a simple function (IIFE) which is being passed an object, property of which is a number</li>
  <li>When we are trying to find typeof of that property which refers to a number, the result is 'undefined'</li>
  </ul>
  
  <p>How? </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script&gt;
  
  x = (function(foo){
    return typeof(foo.bar);
  })({ foo: { bar: 1 } });
  
  console.log(x);
  
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>