Octal escape sequences should be a lexical/syntactic error in strict mode and ES5
See original GitHub issueThe following code should be disallowed in strict mode and ES5:
"\5";
"\05";
"\55";
"\055";
This is disallowed by Annex B.1.2 of the EcmaScript 5 spec.
Issue Analytics
- State:
- Created 9 years ago
- Reactions:1
- Comments:21 (10 by maintainers)
Top Results From Across the Web
SyntaxError: "0"-prefixed octal literals and octal escape seq ...
Octal literals and octal escape sequences are deprecated and will throw a SyntaxError in strict mode. The standardized syntax uses a leading ...
Read more >ECMA-262-5 in detail. Chapter 2. Strict Mode.
A conforming implementation, when processing strict mode code, may not extend the syntax of numeric literals and escape sequence with octal ...
Read more >Why are Octal numeric literals not allowed in strict mode (and ...
Octal literals are not allowed because disallowing them discourages programmers from using leading zeros as padding in a script.
Read more >"0"-prefixed octal literals and octal escape seq. are deprecated
Octal literals and octal escape sequences are deprecated and will throw a SyntaxError in strict mode. With ECMAScript 2015 and later, the standardized...
Read more >Strict mode
Strict mode applies to entire scripts or to individual functions. It doesn't apply to block statements enclosed in {} braces; attempting to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, just give it a shot and see how it goes 👍🏻
@orta https://github.com/microsoft/TypeScript/issues/396#issuecomment-910158675 If you could confirm this, it would be greatly appreciated!