You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/02-first-steps/08-comparison/article.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ alert( 'Bee' > 'Be' ); // true
57
57
2.`l`은 `l`과 같습니다.
58
58
3.`o`는 `e`보다 크기 때문에 여기서 비교가 종료되고, `o`가 있는 첫 번째 문자열 `"Glow"`가 더 크다는 결론이 도출됩니다.
59
59
60
-
```smart header="비교는 사전순이 아니라 유니코드 순입니다."
60
+
```smart header="정확히는 사전순이 아니라 유니코드 순입니다."
61
61
자바스크립트의 문자열 비교 알고리즘은 사전이나 전화번호부에서 사용되는 정렬 알고리즘과 아주 유사하지만, 완전히 같진 않습니다.
62
62
63
63
차이점 중 하나는 자바스크립트는 대·소문자를 따진다는 것입니다. 대문자 `"A"`와 소문자 `"a"`를 비교했을 때 소문자 `"a"`가 더 큽니다. 자바스크립트 내부에서 사용되는 인코딩 표인 유니코드에선 소문자가 대문자보다 더 큰 인덱스를 갖기 때문이죠. 이와 관련한 자세한 내용은 <info:string> 챕터에서 다루도록 하겠습니다.
0 commit comments