var txt, txt1,
ds = [1, 2, 3, 4, 5], ds1 = [4, 5, 6, 7];
for (var i = 0, length = ds.length; i < length; i++) {
txt = '我是第一重for,值为:' + ds[i];
for (var j = 0, length = ds1.length; j < length; j++) {
txt1 = '我是第二重for,值为:' + ds1[j];
console.log(txt + ' ---- ' + txt1)
}
}
不然把你意思再详细点?