---
description: 🚧 under construction -> not not (!!)
---

# unary plus (+)

[JS](../../../..) ⟩ [statement](../../../statement) ⟩ [expression](../../../statement/expr) ⟩ [operator](../..) ⟩ [arithmetic](..) ⟩ [unary]() ⟩ +

{% hint style="success" %}
[**convert**](../../../../val/type/convert) any [val](../../../../val "mention") (except [symbol](../../../../val/prim/symbol "mention"), [bigint](../../../../val/prim/bigint "mention")) to [num](../../../../val/prim/num "mention").

```javascript
// any -> number
+x

// except Symbol, BigInt
+Symbol()   // ⛔️ TypeError
+40n        // ⛔️ TypeError
// TypeError: Cannot convert a Symbol/BigInt value to a number
```

:star2: [table-of-operators](../../table-of-operators "mention"), [Broken link](broken-reference "mention")
{% endhint %}

{% tabs %}
{% tab title="🧨 雷區" %}
* [no-sym-to-num](../../../../err/type/no-sym-to-num "mention")
* [no-bigint-to-num](../../../../err/type/no-bigint-to-num "mention")
{% endtab %}

{% tab title="👥 相關" %}
* [convert](../../../../val/type/convert "mention")
* [double-tilde](../bitwise/not/double-tilde "mention") - nearest integer towards zero.
* not not (!!) - convert any -> bool.
* uses punctuator [+](../../../token/punctuator/+ "mention").
{% endtab %}

{% tab title="📗 參考" %}
* [ ] [javascript-the-definitive-guide](../../../../../master/ref/javascript-the-definitive-guide "mention") ⟩ 4.8.2 Unary Arithmetic Operators
{% endtab %}
{% endtabs %}
