This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Шестнадцатеричная система счисления | |
0x1F468 = (0xD83D - 0xD800) * 0x400 + 0xDC68 - 0xDC00 + 0x10000 | |
// Десятичная система счисления | |
128104 = (55357 - 55296) * 1024 + 56424 - 56320 + 65536< |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ZWJ-последовательность: семья (мужчина, женщина, мальчик) | |
// U+1F468 + U+200D + U+1F469 + U+200D + U+1F466 | |
[...'👨👩👦'] // ["👨", "", "👩", "", "👦"] | |
‘👨👩👦’.length // 8 | |
// нейтральная семья | |
// U+1F46A | |
[...’👪’] // [’👪’] | |
’👪’.length // 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
‘👨’.length // 2 | |
‘👨’.charCodeAt(0) // 55357 -> U+D83D - возвращает символ ведущего суррогата | |
‘👨’.charCodeAt(1) // 56424 -> U+DC68 | |
‘👨’.codePointAt(0) // 128104 -> U+1F468 - возвращает общий символ суррогата | |
‘👨’.codePointAt(1) // 56424 -> U+DC68 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
‘ツ’.length // 1 -> U+FF82 | |
‘⛷’.length // 1 -> U+26F7 | |
‘☃’.length // 1 -> U+9731 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ZWJ-последовательность: женщина-певица | |
// U+1F469 + U+1F3FF + U+200D + U+1F3A4 | |
// 👩 + 🏿 + U+200D + 🎤 | |
> 👩🏿🎤 // единый символ может не отображаться |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ZWJ-последовательность: семья (мужчина, девочка, девочка) | |
// U+1F468 + U+200D + U+1F467 + U+200D + U+1F467 | |
// 👨 + U+200D + 👧 + U+200D + 👧 | |
> 👨👧👧 // единый символ может не отображаться |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// U+1F467 + U+1F3FD | |
// 👧 + 🏽 | |
> 👧🏽 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// обычная семья | |
// U+1F46A | |
> 👪 | |
// ZWJ-последовательность: семья (мужчина, женщина, мальчик) | |
// U+1F468 + U+200D + U+1F469 + U+200D + U+1F466 | |
// 👨 + U+200D + 👩 + U+200D + 👦 | |
> 👨👩👦 | |
// ZWJ-последовательность: семья (женщина, женщина, девочка) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[...'👨👩👦'] // ["👨", "", "👩", "", "👦"] | |
‘👨👩👦’.length // 8 |