> For the complete documentation index, see [llms.txt](https://lochiwei.gitbook.io/web/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lochiwei.gitbook.io/web/js/val/obj/prop/access/dot-notation-./vs-decimal-point.md).

# dot notation vs. decimal point

🚧 施工中

[JS](/web/js.md) ⟩ [values](/web/js/val.md) ⟩ [object](/web/js/val/obj.md) ⟩ [property](/web/js/val/obj/prop.md) ⟩ [name](/web/js/val/obj/prop/name.md) ⟩ [dot notation](/web/js/val/obj/prop/access/dot-notation-..md) ⟩ vs. decimal point

{% hint style="success" %}

* [dot notation (.)](/web/js/val/obj/prop/access/dot-notation-..md)：refers to an object's <mark style="color:yellow;">member</mark>.
* <mark style="color:yellow;">**decimal point**</mark>：used for <mark style="color:yellow;">number literals</mark>.
  {% endhint %}

{% tabs %}
{% tab title="💈範例" %}

* replit：[dot notation](https://replit.com/@pegasusroe/dot-notation#index.js)

```javascript
// ⭐️ differantiate "dot notation" from a "decimal point"

// • method 1: use "white spaces"
77 .toExponential(),    // (an extra) space

77                      // new line
.toExponential(),

// • method 2: use (...)
(77).toExponential(),   // (recommended) ⭐️ 

// • method 3: use explicit "."
77..toExponential(),    // 77. === 77.0
77.0.toExponential(),   // 0 is optional
```

{% endtab %}

{% tab title="👥 相關" %}

* [token](/web/js/grammar/token.md) ⟩ [dot (.)](/web/js/grammar/token/punctuator/dot.md)
  {% endtab %}

{% tab title="📘 手冊" %}

* [Property accessors](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Property_Accessors) ⟩ [dot notation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Property_Accessors#dot_notation)
  {% endtab %}

{% tab title="🚧" %}

* [ ] object's member
* [ ] number literal
  {% endtab %}
  {% endtabs %}
