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
ìë¬ íì
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";