How to break/continue across nested for each loops in Type Script : <p>I tried to use break inside nested for each loop and it says <strong>jump target cannot cross function boundary</strong>. please let me know how can i break nested for each loop when certain condition is met in type script.</p>

<pre><code>groups =[object-A,object-B,object-C]
    groups.forEach(function (group) {
    // names also an array
        group.names.forEach(function (name) {

        if (name == 'SAM'){
         break; //can not use break here it says jump target cannot cross function boundary
      }

    }

    }
</code></pre>
