Logo

Programming-Idioms

History of Idiom 42 > diff from v2 to v3

Edit summary for version 3 by :

Version 2

2015-07-31, 23:31:36

Version 3

2015-08-01, 17:54:14

Idiom #42 Continue outer loop

Print each item v of list a which in not contained in list b.
For this, write an outer loop to iterate on a and an inner loop to iterate on b.

Idiom #42 Continue outer loop

Print each item v of list a which in not contained in list b.
For this, write an outer loop to iterate on a and an inner loop to iterate on b.

Code
OUTER:
for (var i in a) {
   for (var j in b) {
      continue OUTER if a[i] === b[j];
      console.log(a[i] + " not in the list");
   }
}