Closed 19wintersp closed 3 years ago
Allows C-style escapes in strings.
\n
\r
\t
\a
\b
\e
\f
\v
\\
\'
\"
\?
\o___
\x__
\u____
\U________
Throws SyntaxError with "Invalid string escape." on error.
SyntaxError
Looks good!
Allows C-style escapes in strings.
\n
: newline/line feed (LF)\r
: return (CR)\t
: (horizontal) tab (HT)\a
: alert (BEL)\b
: backspace (BS)\e
: escape (ESC)\f
: form feed (FF)\v
: vertical tab (VT)\\
: backslash/reverse solidus\'
: single quote/apostrophe\"
: double quote/quotation mark\?
: question mark\o___
: octal byte\x__
: hexadecimal byte\u____
: four-nibble (2B) hexadecimal\U________
: eight-nibble (4B) hexadecimalThrows
SyntaxError
with "Invalid string escape." on error.