프로그래머스 lev1 - 문자열 내림차순으로 배치하기
function solution(s) { return s.split('').sort((a,b) => { if (a>b) return -1; else if (b>a) return 1; else return 0; }).join(''); } console.log(solution("Zbcdefg"));