---
description: 🚧 under construction
---

# Boolean

[JS](../..) ⟩ [primitive]() ⟩ boolean

{% hint style="success" %}
```javascript
!!x    // any -> boolean
```
{% endhint %}

{% tabs %}
{% tab title="⭐️ 重點" %}
{% hint style="info" %}
<mark style="color:yellow;">**Every**</mark> [..](.. "mention") <mark style="color:yellow;">**is either**</mark> [<mark style="color:green;">**truthy**</mark>](../type/falsy) <mark style="color:yellow;">**or**</mark> [<mark style="color:purple;">**falsy**</mark>](../type/falsy):exclamation:
{% endhint %}

{% hint style="warning" %}
&#x20;[op](../../grammar/op "mention")(s) that expect [<mark style="color:yellow;">**boolean**</mark>](boolean) operands will work with an operand of <mark style="color:red;">**any**</mark>**&#x20;**<mark style="color:yellow;">**type**</mark>:exclamation:
{% endhint %}

{% hint style="success" %}
[**convert**](../type/convert) any [..](.. "mention") to <mark style="color:purple;">**Boolean**</mark>.

```javascript
!!x    // conversion: any -> true/false
```
{% endhint %}
{% endtab %}

{% tab title="🔴 主題" %}
* [falsy](../type/falsy "mention")
{% endtab %}

{% tab title="👥 相關" %}
* [not-f](../func/kind/higher/not-f "mention") - logical negation of a function.
{% endtab %}
{% endtabs %}
