I've been trying to output the array contents of spliceJoin
in Chrome Developer Tools but it always output undefined
Am I missing something?
var wordPermLength = 2;
var wordPerm = ['ab', 'ac', 'a'];
var spliceJoin = [];
function joinWords() {
for (i = 0; i < wordPermLength; i++) {
spliceJoin.push(wordPerm[i].concat(wordPerm[i++]));
}
}
console.log(spliceJoin);