# reserved word as property name is allowed❗️

[JS](../../../..) ⟩ [grammar](../../..) ⟩ [keyword](..) ⟩ [reserved word]() ⟩ as property name is allowed:exclamation:

{% hint style="success" %}
[](<> "mention") <mark style="color:green;">**can**</mark>**&#x20;**<mark style="color:yellow;">**be used as**</mark> [name](../../../../val/obj/prop/name "mention"):exclamation:

```javascript
const obj = { var: 'joe' };    // ❗️ "var" is reserved word
obj.var;                       // ⭐️ 'joe'
```
{% endhint %}

{% tabs %}
{% tab title="📘 手冊" %}
* [ ] [Lexical grammar](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar) ⟩ [keywords](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#keywords) ⟩ [reserved words](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#reserved_words)
* [ ] [SyntaxError: "x" is a reserved identifier](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Reserved_identifier)
* [ ] ECMA spec ⟩ [12.6.2 Keywords and Reserved Words](https://262.ecma-international.org/13.0/#sec-keywords-and-reserved-words) ⟩ [Reserved Words](https://262.ecma-international.org/13.0/#prod-ReservedWord) ⭐️
{% endtab %}

{% tab title="📗 參考" %}
* [ ] TeckTutorialHub ⟩ [JavaScript Keywords & Reserved Words](https://www.tektutorialshub.com/javascript/javascript-keywords-reserved-words/) ⭐️
{% endtab %}
{% endtabs %}
