> For the complete documentation index, see [llms.txt](https://xiaohesong.gitbook.io/today-i-learn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xiaohesong.gitbook.io/today-i-learn/front-end/basic.md).

# basic

* `NaN`

  这个得字面意思就是"Not a Number"。但是这个描述的并不是很好。把它描述成"无效的数字"反而会好点。 参考[这里](https://github.com/xiaohesong/TIL/blob/master/front-end/javascript/you-dont-known-js/types%26grammer/Chapter2-Values.md#special-numbers)
* `==` vs `===`

  大多数书籍中对于这两者的描述通常是：`==`是判断值是否相等，`===`是判断值和类型是否都相等。 这个说法是 **错误** 的。 更准确的说：“`==`允许在比较中强制，`===`不允许强制。” 参考[这里](https://github.com/xiaohesong/TIL/blob/master/front-end/javascript/you-dont-known-js/types%26grammer/Chapter4-coercion.md#loose-equals-vs-strict-equals)

## 原始类型和引用类型的区别

* 可变性
  * 原始类型不可变
  * 引用类型可变
* 存储位置
  * 原始存储在栈中, 存储的变量直接访问的位置。
  * 引用类型存储在堆中， 存储的是变量的位置，他指向引用对象在内存中的位置。
* 比较
  * 原始类型直接对值进行比较
  * 引用类型在某些情况下会进行类型转换成初始类型(==, >, <, ...)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://xiaohesong.gitbook.io/today-i-learn/front-end/basic.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
