---
description: 🚧 under construction -> function context
---

# function forwarding

[JS](../..) ⟩ [value](..) ⟩ [function]() ⟩ forwarding

{% hint style="success" %}
Passing <mark style="color:yellow;">**all**</mark> [**arguments**](argument) along with the <mark style="color:yellow;">**context**</mark> to another function is called call <mark style="color:purple;">**forwarding**</mark>.

```javascript
function f() {
    // forward call to g()
    return g.apply(this, arguments);
}
```
{% endhint %}

{% tabs %}
{% tab title="📗 參考" %}
* [ ] js.info ⟩[ func.apply](https://javascript.info/call-apply-decorators#func-apply) ⭐️&#x20;
{% endtab %}

{% tab title="📘 手冊" %}
* [Function.prototype.apply()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply)
{% endtab %}
{% endtabs %}
