for in construct
<p>I recently stumbled upon this construct in Javascript:</p>

<pre><code>function find(id) {
  var found = null;

  findloop: for (var index in products){
    var product = products[index];
    if (product.id === id) {
      found = product;
      break findloop;
    }
  };
  return found;
}
</code></pre>

<p>What bothers me is the <code>findloop:</code>
Is this even a legal syntax ? What is the point of it ?</p>

<p>thanks</p>
