jquery - Get "cross product" of lists in JavaScript -


can optimized

var groups = []; (var in alist) {   (var bnumber in blist) {     groups.push({ a: a, b: b });   } } 

the code fine, realized looks cross product of 2 lists, instead of looping alist.length*blist.length times, wondered if there smart function this.


Comments