> For the complete documentation index, see [llms.txt](https://lochiwei.gitbook.io/web/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lochiwei.gitbook.io/web/js/grammar/op/term/associativity.md).

# associativity

🚧 under construction

[JS](/web/js.md) ⟩ [statement](/web/js/grammar/statement.md) ⟩ [expression](/web/js/grammar/statement/expr.md) ⟩ [operator](/web/js/grammar/op.md) ⟩ [term](/web/js/grammar/op/term.md) ⟩ associativity

{% hint style="success" %}
specifies the <mark style="color:yellow;">**order**</mark> in which operations of the <mark style="color:red;">**same**</mark>**&#x20;**<mark style="color:yellow;">**precedence**</mark> are performed.

```javascript
x * y * z === ((x * y) * z)    // L: left-to-right 
x = y = z === (x = (y = z))    // R: right-to-left 
```

:point\_right: [table of operators](/web/js/grammar/op/table-of-operators.md)
{% endhint %}

{% tabs %}
{% tab title="📗 參考" %}

* [JavaScript: The Definitive Guide](/web/master/ref/javascript-the-definitive-guide.md) ⟩ 4.7.5 Operator Associativity
  {% endtab %}
  {% endtabs %}
