Character Escape Sequences

Character escape sequences allow for a character to be interpreted differently than its literal value. Character escape sequences are defined using the backslash (\) character, followed by the escape sequence code. The following table shows a list of character escape sequences with a description of what they do.

Character Escape Sequence





Form feed


New line


Carriage return




Unicode escape sequence (see the next section for details)


Backslash character. This is how a backslash can be treated as just an actual backslash character.


Single quote. Define a single quote character so it is not treated as a character delimiter.


Double quote. Define a double quote character so it is not treated as a string delimiter.

The aforementioned escape sequences are used with string notations and will be discussed in more detail in the "Strings" section of .