SOURCE

function removeDuplicateCharsIgnoreCaseAndSort(string) {
    let set = new Set();
    for(let char of string) {
        set.add(char.toLowerCase());
    }
    let array = Array.from(set).sort();
    return array.join('');
}

const inputStr = 'BbAaCcDdEeBb';
const uniqueSortedStr = removeDuplicateCharsIgnoreCaseAndSort(inputStr);
console.log(uniqueSortedStr);
console 命令行工具 X clear

                    
>
console