title: if condition evaluation in javascript using eval at runtime
body: <pre><code> var y = 1;
  
   if (function f(){}) {
     y += typeof f;
   }
   console.log(y);
  </code></pre>
  
  <p>The Output of this code is <code>1undefined</code>. I get the reason that the condition in <code>if</code> statement is evaluated using <code>eval</code> at runtime, but I cannot understand why it is not outputting <code>1function</code>.</p>