2017-06-19 99 views

回答

0

你可以試試:

var input = ['a','b','c','d','e']; 
var output = []; 
for (var i = 0; i < input.length; i += 1) { 
     output[i] = []; 
    output[i].push(input[i]); 
    output[i].push(input[i + 1]); 
}