Step 1: think about your problem, figure out what logical process would turn your input into your desired output. Step 2: think about what code you can write that will accomplish this and then write this code. Step 3: if your code doesn't work the way you intended and you can't see why, then post a question on Stackoverflow and include your attempted code in the question
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]);
}