[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Errors/Deprecated_octal_literal [Back]  [Original]

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

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

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

    SyntaxError: Octal numeric literals and escape characters not allowed in strict mode (Edge)
    SyntaxError:
    "0"-prefixed octal literals and octal escape sequences are deprecated;
    for octal literals use the "0o" prefix instead

In this article

SyntaxError strict mode .

?

8 8 , (strict mode) SyntaxError . ECMAScript 2015 0 "O" . (0o 0O)

"0" 8

js
"use strict";

03;

// SyntaxError: "0"-prefixed octal literals and octal escape sequences
// are deprecated (0  8 8      . )

8

js
"use strict";

"\251";

// SyntaxError: "0"-prefixed octal literals and octal escape sequences
// are deprecated (0  8 8      . )

8

0 "o" "O" . :

js
0o3;

8 16 . :

js
"\xA9";

See also


Web Proxy Viewer  |  New URL  |  Original Page