# falsy

**下面哪些值是 falsy?**

```javascript
0
new Number(0)
('')
(' ')
new Boolean(false)
undefined
```

{% tabs %}
{% tab title="选项" %}

* A: `0`, `''`, `undefined`
* B: `0`, `new Number(0)`, `''`, `new Boolean(false)`, `undefined`
* C: `0`, `''`, `new Boolean(false)`, `undefined`
* D: All of them are falsy
  {% endtab %}

{% tab title="答案" %}
**答案: A**

只有 6 种 [falsy](https://developer.mozilla.org/zh-CN/docs/Glossary/Falsy) 值:

* `undefined`
* `null`
* `NaN`
* `0`
* `''` (empty string)
* `false`

`Function` 构造函数, 比如 `new Number` 和 `new Boolean`，是 [truthy](https://developer.mozilla.org/zh-CN/docs/Glossary/Truthy)。
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mm.ricky.moe/interview/inverview-record/javascript-questions/falsy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
