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.
var array = ['a', 'b', 'c', 'd', 'e', 'f']; results = []; for (x = 1; x < array.length + 1; ++x) { results.push(array.slice(0, x).toString().replace(/,/g, "")) } //PRINT ALL RESULTS IN THE RESULTS VARIABLE for (x = 0; x < results.length; ++x) { console.log(results[x]) }