> 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/err/syntax/octal-literals-not-allowed-in-strict-mode.md).

# 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 %}
