// Define two arrays var a = [100, 200]; var b = [[0, 3], [0, 4], [1, 5], [2, 5]]; // Define empty array for result var result = []; // Loop over 'b', each time adding next element in 'result' for(var i in b) { result.push([a, b[i]]); } // In the end, 'result' contains the following array - // [[[100, 200], [0, 3]], [[100, 200], [0, 4]], [[100, 200], [1, 5]], [[100, 200], [2, 5]]]