[프로그래머스 | Lv. 1 | JavaScript] 문자열 내림차순으로 배치하기
·
알고리즘/문제
Link코딩테스트 연습 - 문자열 내림차순으로 배치하기 문제풀이(1)function solution(s) { return s.split('') .sort((a, b) => { if ((a === a.toUpperCase() && b === b.toLowerCase())) { return 1; } else if ((b === b.toUpperCase() && a === a.toLowerCase())) { return -1; } else { return a > b ? -1 : 1; ..