# with

[JS](../../..) ⟩ [statement](..) ⟩ [other]() ⟩ with

{% hint style="success" %}
([..](.. "mention")) <mark style="background-color:red;">**deprecated**</mark>  .

make the <mark style="color:yellow;">**properties**</mark> of a <mark style="color:yellow;">**specified object**</mark> the <mark style="color:orange;">**variables**</mark> in a [**block scope**](block/block).

```javascript
with ( <object> ) <statement>
```
{% endhint %}

{% tabs %}
{% tab title="⭐️ 重點" %}
{% hint style="warning" %}
<mark style="color:purple;">**with**</mark> <mark style="color:yellow;">**statement**</mark> is <mark style="color:red;">**forbidden**</mark> in [strict-mode](../../../concept/env/js-engine/mode/strict-mode "mention").
{% endhint %}
{% endtab %}

{% tab title="📗 參考" %}
* [ ] [javascript-the-definitive-guide](../../../../master/ref/javascript-the-definitive-guide "mention") ⟩ 5.6.1 with&#x20;
{% endtab %}

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