<p>What's the best way to break from nested loops in Javascript?</p>

<pre><code>//Write the links to the page.
for (var x = 0; x &lt; Args.length; x++)
{
   for (var Heading in Navigation.Headings)
   {
      for (var Item in Navigation.Headings[Heading])
      {
         if (Args[x] == Navigation.Headings[Heading][Item].Name)
         {
            document.write("&lt;a href=\"" 
               + Navigation.Headings[Heading][Item].URL + "\"&gt;" 
               + Navigation.Headings[Heading][Item].Name + "&lt;/a&gt; : ");
            break; // &lt;---HERE, I need to break out of two loops.
         }
      }
   }
}
</code></pre>

Wrap that up in a function and then just
```
return
```
.