Skip to content

Commit 87c0ca9

Browse files
authored
mdn link
1 parent 18b1314 commit 87c0ca9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

1-js/99-js-misc/06-unicode/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Pieces of a surrogate pair have no meaning without each other. So the alerts in
7575

7676
Technically, surrogate pairs are also detectable by their codes: if a character has the code in the interval of `0xd800..0xdbff`, then it is the first part of the surrogate pair. The next character (second part) must have the code in interval `0xdc00..0xdfff`. These intervals are reserved exclusively for surrogate pairs by the standard.
7777

78-
So the methods `String.fromCodePoint` and `str.codePointAt` were added in JavaScript to deal with surrogate pairs.
78+
So the methods [String.fromCodePoint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCodePoint) and [str.codePointAt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt) were added in JavaScript to deal with surrogate pairs.
7979

8080
They are essentially the same as [String.fromCharCode](mdn:js/String/fromCharCode) and [str.charCodeAt](mdn:js/String/charCodeAt), but they treat surrogate pairs correctly.
8181

0 commit comments

Comments
 (0)