A string value is a series of zero or more Unicode characters (letters, digits, and other characters). String literals are enclosed in matching pairs of single or double quotation marks. Double quotation marks can be contained in a string that is enclosed in single quotation marks. Single quotation marks can be contained in a string that is enclosed in double quotation marks.
You can specify a Unicode character by using the \uhhhh escape sequence, where hhhh is a four-digit hexadecimal number. A Unicode escape sequence can represent any 16-bit character.
You can use a single-character escape sequence for some characters. For example, \t specifies a tab character.
The following table lists escape sequences for several characters.
Unicode character value
Line feed (new line)
(See note after this table.)
Double quotation mark (")
Single quotation mark (')
Byte order mark
The backslash itself is used as the escape character. Therefore, you cannot directly type one in your script. If you want to write a backslash, you must type two of them together (\\).
Starting in Internet Explorer 9 standards mode, you cannot identify the browser as Internet Explorer by testing for the equivalence of the vertical tab (\v) and the "v". In earlier versions, the expression "\v" === "v" returns true. In Internet Explorer 9 standards mode, the expression returns false.