# identifier vs. string

[JS](../../..) ⟩ [grammar](../..) ⟩ [token](..) ⟩ [identifier]() ⟩ vs. string

{% hint style="success" %}
<mark style="color:purple;">**identifier**</mark> vs. [str](../../../val/prim/str "mention")

* &#x20;an <mark style="color:purple;">**identifier**</mark> is <mark style="color:red;">**not**</mark> a <mark style="color:yellow;">**string**</mark>：
  * a [string](https://developer.mozilla.org/en-US/docs/Glossary/String) is <mark style="color:yellow;">**data**</mark>.
  * an <mark style="color:purple;">**identifier**</mark> is <mark style="color:yellow;">**part of the code**</mark>.&#x20;
* <mark style="color:orange;">**conversion**</mark> between them：
  * <mark style="color:purple;">**identifier**</mark> <mark style="color:red;">-></mark> string (:x: <mark style="color:red;">**no way**</mark> )
  * string <mark style="color:yellow;">-></mark> <mark style="color:purple;">**identifier**</mark> (:warning: <mark style="color:yellow;">**possible**</mark> )
{% endhint %}

{% tabs %}
{% tab title="📘 手冊" %}
* [Identifier](https://developer.mozilla.org/en-US/docs/Glossary/Identifier)
{% endtab %}
{% endtabs %}
