question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Octal escape sequences should be a lexical/syntactic error in strict mode and ES5

See original GitHub issue

The 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:open
  • Created 9 years ago
  • Reactions:1
  • Comments:21 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
ortacommented, Aug 25, 2021

Yeah, just give it a shot and see how it goes 👍🏻

0reactions
reez12gcommented, Sep 4, 2021

@orta https://github.com/microsoft/TypeScript/issues/396#issuecomment-910158675 If you could confirm this, it would be greatly appreciated!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found