ASCII Escape Codes

When writing strings in programming, there are times you need to represent characters that can't be typed directly, such as newlines or tabs. To handle these situations, ASCII escape codes provide a way to "write the un-writable." Escape codes allow you to include special or unprintable characters in your strings by using a sequence that starts with a backslash (\).

Valid Escape Codes

CODEDescription
\\Backslash (\)
\nNewline
\rCarriage Return
\tTab
\"Double Quote (")