How to continue outer loop in TypeScript

1 Answer

0 votes
const a: number[] = [4, 5, 1, 1, 6, 7, 0, 1, 1, 1, 8];
const b: number[] = [9, 1, 2];
        
OUTER:
for (let i in a) {
   for (let j in b) {
      if (a[i] === b[j]) {
         continue OUTER;
      }
   }
   console.log(a[i]);
}
 
 
 
/*
run:
 
4
5
6
7
0
8
 
*/
 

 



answered Apr 24, 2025 by avibootz

Related questions

1 answer 155 views
1 answer 103 views
103 views asked Apr 25, 2025 by avibootz
3 answers 169 views
2 answers 110 views
1 answer 143 views
143 views asked Apr 24, 2025 by avibootz
2 answers 161 views
161 views asked Apr 24, 2025 by avibootz
...