Looking for a way to sequentially find different arrangement possibilities of an array. I only care about adding them sequentially, doesn\'t need skip or shuffle values.
You can easily reduce the array by slicing the array to the current index.
var inputArray = ['a', 'b', 'c', 'd', 'e', 'f'];
var outputArray = inputArray.reduce(function(result, item, index, arr) {
return result.concat(arr.slice(0, index + 1).join(''));
}, []);
document.body.innerHTML = '' + outputArray.join('\n') + '
';
Note: I am still not sure what you mean by "find different arrangement possibilities of an array".