-
[JavaScript] 숫자로 된 문자열 정렬JavaScript 2023. 7. 27. 20:19
문자열을 정렬할 때 첫번째 인덱스부터 차례로 정렬이 되기 때문에
숫자의 크기 순으로 정렬이 되지 않고 '1' -> '1111' -> '2' ... 순으로 정렬이 되는 것을 볼 수 있었다.
반응형'JavaScript' 카테고리의 다른 글
[JavaScript] 커링이란? (0) 2023.09.20 [JavaScript] Array.fill() 사용 시 주의할 점 (0) 2023.08.13 [TypeScript] reduce 사용하기 (array to object) (0) 2023.07.06 [JavaScript] Web Audio API 이해하기 위해 쓰는 글 (0) 2023.06.27 [JavaScript] 조합 알고리즘 코드 이해하기 (0) 2023.05.17