# octal literals not allowed in strict mode❗️

[JS](/web/js.md) ⟩ [error](/web/js/err.md) ⟩ [SyntaxError](/web/js/err/syntax.md) ⟩ delete of an unqualified identifier in strict mode

{% hint style="danger" %}
[<mark style="color:red;">**SyntaxError**</mark>](/web/js/err/syntax.md)<mark style="color:red;">**:**</mark> [<mark style="color:yellow;">**octal literals not allowed in strict mode**</mark>](/web/js/err/syntax/octal-literals-not-allowed-in-strict-mode.md):exclamation:
{% endhint %}

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

* replit：[octal literals not allowed in strict mode](https://replit.com/@pegasusroe/octal-literals-not-allowed-in-strict-mode#index.js)

```javascript
let x = 010;    // ❗ octal literal
let y = 0x10;   // ⭐ hexadecimal literal

//  mode:    sloppy      strict
// -------------------------------------
x,        // ✅ 8       ⛔ SyntaxError
y,        // ✅ 16      ✅ 16

// ⛔ SyntaxError: Octal literals are not allowed in strict mode.
```

{% endtab %}

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

* [literal](/web/js/grammar/token/literal.md)
* [strict mode](/web/js/concept/env/js-engine/mode/strict-mode.md)
* [always use strict mode](/web/js/concept/env/js-engine/mode/strict-mode/always.md)
  {% endtab %}

{% tab title="📗 參考" %}

* [ ] itHome ⟩ [你不可不知的 JavaScript 二三事](https://ithelp.ithome.com.tw/users/20112483/ironman/2016) ⟩&#x20;
  * [ ] [#Day12：看 Strict Mode 如何施展「還我漂亮拳」(1)](https://ithelp.ithome.com.tw/articles/10205275)
    {% endtab %}

{% tab title="📘 手冊" %}
\*
{% endtab %}

{% tab title="🚧" %}

* [ ] octal literal
  {% 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://lochiwei.gitbook.io/web/js/err/syntax/octal-literals-not-allowed-in-strict-mode.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.
