var b = [1, 5, 6, 9],
s = [2, 5, 9],
g = [7, 8, 9],
r = [];
for (var i = 0; i < b.length; i++) {
for (var j = 0; j < s.length; j++) {
for (var k = 0; k < g.length; k++) {
r.push("" + b[i] + s[j] + g[k]);
}
}
}
console.log(r);
var b = [1, 5, 6, 9],
s = [2, 5, 9],
g = [7, 8, 9],
r = [];
for (var i = 0; i < b.length; i++) {
for (var j = 0; j < s.length; j++) {
for (var k = 0; k < g.length; k++) {
r.push("" + b[i] + s[j] + g[k]);
}
}
}
console.log(r);