---
description: 🚧 under construction
---

# code plane

[JS](../../../..) ⟩ [value](../../..) ⟩ [primitive](../..) ⟩ [String](..) ⟩ [Unicode]() ⟩ code plane

{% hint style="success" %}
a range of <mark style="color:yellow;">**65,536**</mark> (<mark style="color:blue;">`0x10000`</mark>) contiguous [**code points**](code-point)&#x20;

* <mark style="color:yellow;">**U+**</mark><mark style="color:orange;">**n**</mark><mark style="color:yellow;">**0000**</mark> \~ <mark style="color:yellow;">**U+**</mark><mark style="color:orange;">**n**</mark><mark style="color:yellow;">**FFFF**</mark> (<mark style="color:orange;">**n**</mark> = <mark style="color:orange;">`0x0`</mark> \~ <mark style="color:orange;">`0x10`</mark>), divided into <mark style="color:yellow;">**17 planes**</mark>.
* <mark style="color:purple;">**Basic Multilingual Plane**</mark> (plane 0, <mark style="color:purple;">**BMP**</mark>) - <mark style="color:yellow;">**U+0000**</mark> \~ <mark style="color:yellow;">**U+FFFF**</mark>.
* <mark style="color:purple;">**astral planes**</mark> (<mark style="color:purple;">**supplementary planes**</mark>, plane 1 \~ 16) - <mark style="color:yellow;">**U+**</mark><mark style="color:orange;">**1**</mark><mark style="color:yellow;">**0000**</mark> \~ <mark style="color:yellow;">**U+**</mark><mark style="color:orange;">**10**</mark><mark style="color:yellow;">**FFFF**</mark>.

astral code points :  <mark style="color:yellow;">**U+**</mark><mark style="color:orange;">**1**</mark><mark style="color:yellow;">**0000**</mark> \~ <mark style="color:yellow;">**U+**</mark><mark style="color:orange;">**10**</mark><mark style="color:yellow;">**FFFF**</mark>.
{% endhint %}

{% tabs %}
{% tab title="💈範例" %}
* replit ⟩&#x20;

```javascript
// code
```
{% endtab %}

{% tab title="📗" %}
* [ ] Eloquent JavaScript ⟩ [Strings & Character Codes](https://eloquentjavascript.net/05_higher_order.html#h_gQf5HZNGpM)
{% endtab %}

{% tab title="📘 手冊" %}
* [UTF-16 characters, code points, grapheme clusters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters)
* String.prototype ⟩&#x20;
  * [.charCodeAt()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt)
  * [.codePointAt()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt)
* [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) ⟩&#x20;
  * [.fromCodePoint()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCodePoint)
  * [.fromCharCode()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode)
{% endtab %}
{% endtabs %}
