2.1.4 [ECMA-ES2017] Section 11.8.6 Template Literal Lexical Components

V0040: The escape sequence \0 is treated as a legacy octal escape sequence and a SyntaxError is thrown

The specification states:

 11.8.6 Template Literal Lexical Components
  
     Syntax
  
         Template ::
             NoSubstitutionTemplate
             TemplateHead
  
         NoSubstitutionTemplate ::
             ` TemplateCharactersopt `
  
         TemplateHead ::
             ` TemplateCharactersopt ${
  
         TemplateSubstitutionTail ::
             TemplateMiddle
             TemplateTail
  
         TemplateMiddle ::
             } TemplateCharactersopt ${
  
         TemplateTail ::
             } TemplateCharactersopt `
  
         TemplateCharacters ::
             TemplateCharacter TemplateCharactersopt
  
         TemplateCharacter ::
             $ [lookahead ≠ { ]
             \ EscapeSequence
             \ NotEscapSequence  [Added in 2018 spec]
             LineContinuation
             LineTerminatorSequence
             SourceCharacter but not one of ` or \ or $ or LineTerminator
  
         ...
  
     A conforming implementation must not use the extended definition of EscapeSequence 
     described in B.1.2 when parsing a TemplateCharacter.
  
     NOTE  TemplateSubstitutionTail is used by the InputElementTemplateTail alternative 
     lexical goal.

EdgeHTML Mode

The escape sequence \0 is treated as a legacy octal escape sequence and a SyntaxError is thrown; instead it should be translated into a null character.