---
description: '`f(args)` syntax.'
---

# invocation expression：f()

[JS](../../..) ⟩ [statement](..) ⟩ [expression]() ⟩ invocation

{% hint style="success" %}
([](<> "mention")) <mark style="color:yellow;">**use**</mark> <mark style="color:blue;">**`f(args)`**</mark> syntax to <mark style="color:yellow;">**call**</mark> a [function](../../../val/func)/[method](../../../val/obj/method).

```javascript
f ( args )    // f: expression, args: argument list

f(0)                         // calls a function
Math.max(x, y, z)            // calls a method
```
{% endhint %}

{% tabs %}
{% tab title="🗺️ 圖表" %}
<img src="https://2527454625-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfvEFZnSBhKT6fJmus0%2Fuploads%2Fh1eahK8QybyUP3ZvNGAb%2Finvocation.expression.svg?alt=media&#x26;token=fe332b15-6cc3-4993-9c9c-d7b329067d3e" alt="evaluating an invocation expression" class="gitbook-drawing">
{% endtab %}

{% tab title="🔴 主題" %}
* [method-invocation](invoke/method-invocation "mention")
* [optional-invocation-.](../../../val/obj/prop/access/optional-invocation-. "mention")
{% endtab %}

{% tab title="⭐️ 重點" %}
{% hint style="info" %}
If that <mark style="color:blue;">`funcExpr`</mark> is a [property-access-expression](../../../val/obj/prop/access/property-access-expression "mention"), then the invocation is known as a [method-invocation](invoke/method-invocation "mention").
{% endhint %}

{% hint style="info" %}
[**property access**](../../../val/obj/prop/access/property-access-expression) and [**invocation**](invoke) expressions have <mark style="color:red;">**higher**</mark>**&#x20;**<mark style="color:yellow;">**precedence**</mark> <mark style="color:yellow;">**than**</mark> <mark style="color:red;">**any**</mark> of the [**operators**](../../op/table-of-operators).
{% endhint %}
{% endtab %}

{% tab title="👥 相關" %}
* :information\_source:[parentheses](../../token/punctuator/parentheses "mention") punctuators are used in this syntax.
{% endtab %}

{% tab title="📗 參考" %}
* [ ] [javascript-the-definitive-guide](../../../../master/ref/javascript-the-definitive-guide "mention") ⟩&#x20;
  * [ ] 4.5 Invocation Expressions
  * [ ] Ch. 8 Functions
{% endtab %}

{% tab title="📘 手冊" %}
* [ ] [Expressions and operators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators) ⟩&#x20;
{% endtab %}
{% endtabs %}
