A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Errors/Deprecated_octal_literal below:

SyntaxError: "0"-prefixed octal literals and octal escape seq. are deprecated - JavaScript

SyntaxError: "0"-prefixed octal literals and octal escape seq. are deprecated メッセージ
SyntaxError:
"0"-prefixed octal literals and octal escape sequences are deprecated;
for octal literals use the \"0o\" prefix instead
エラータイプ

strict モードでのみ SyntaxError。

何がうまくいかなかったのか?

8 進文字と 8 進エスケープシーケンスは非推奨で、strict モードでは SyntaxError をスローします。ECMAScript 2015 以降では、標準文法として 0 から始まり大文字、または小文字のラテン文字 "O" (0o or 0O) が続く文法を使用します。

例 "0" 接頭辞付きの 8 進文字
"use strict";

03;

// SyntaxError: "0"-prefixed octal literals and octal escape sequences
// are deprecated
8 進エスケープシーケンス
"use strict";

"\251";

// SyntaxError: "0"-prefixed octal literals and octal escape sequences
// are deprecated
有効な 8 進数

0 に "o" か "O" が続くものを使用します:

8 進エスケープシーケンスの代わりに、16 進エスケープシーケンスを使用できます:

関連項目

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4