10.1.1 String literals

A string literal is a sequence of characters inside a pair of double quotes or single quotes:

var a = "foo";
var b = 'foo';
trace(a == b); // true

The only difference between the two forms is that single-quoted literals allow string interpolation.

Escape sequences
SequenceMeaningUnicode codepoint (decimal)Unicode codepoint (hexadecimal)
\thorizontal tab (TAB)90x09
\nnew line (LF)100x0A
\rnew line (CR)130x0D
\"double quote340x22
\'single quote390x27
\\\\\\\\backslash920x5C
\NNNASCII escape where NNN is 3 octal digits0 - 1270x00 - 0x7F
\xNNASCII escape where NN is a pair of hexadecimal digits0 - 1270x00 - 0x7F
\uNNNNUnicode escape where NNNN is 4 hexadecimal digits0 - 655350x0000 - 0xFFFF
\u{N...}Unicode escape where N... is 1-6 hexadecimal digits0 - 11141110x000000 - 0x10FFFF