combinantition du tableau unique dans le nœud js

function combo(array){
    let results = [];
    for (let i = 0; i < array.length - 1; i++) {
    for (let j = i + 1; j < array.length; j++) {
        results.push(`[${array[i]} ${array[j]}]`.split(' '));
    }
    }

    return results;
}
Nupskill