# Truthiness

Javascript (and other languages) have something called [Truthiness](http://www.comedycentral.com.au/throwbacks/videos/the-colbert-report-the-very-first-episode-clips#the-word-truthiness). Ok, it's actually called [**`Truthy`**](https://www.sitepoint.com/javascript-truthy-falsy/) or [**`Falsy`**](https://www.sitepoint.com/javascript-truthy-falsy/). It is the idea that we can ***infer*** something is true, similar to assuming.

### Falsy

If something does not exist (like `NaN`) or has a value equating to zero, it is considered `false`. For example, an empty string of `""` would be considered false. It has no value.

### Truthy

If the data has value (other than specifically `NaN`, zero, or `false`) it is considered `true`, because it has value. For example, `1 == '1'` will result in `true` because they are equal in value (Javascript converts on-the-fly). However, `1 === '1'` will return `false` because they are not *exactly* equal (one is a numeric value, the other a string).

{% hint style="info" %}
`NaN` stands for Not a Number. Think of it like "undefined" or "does not exist".\
Note: division by zero gives an answer of infinity.
{% endhint %}


---

# 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://cs.brash.ca/unit-2/variables/booleans/truthiness.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.
