Javascript function which does not return a value in every case
<p>If I have a javascript function, it is possible that I do not return a value from every code path, e.g:</p>

<pre><code>function f()
{
  if (checkSomething())
  {
    return 42;
  }
  // no return statement here
}
</code></pre>

<p>Is this valid javascript or does it only work by chance (i.e. might there be problems when run in some browsers)?</p>
