Nevertheless, you may still use single or double quotes within single or double quotes by escaping the quotations with the backslash symbol (), like in the following example:
The sequences " and " that we used in the example above are known as escape sequences, whereas the backslash () is referred to as an escape character.
Escape sequences are also useful when you need to use characters that cannot be typed on a keyboard. Here are some more frequently used escape sequences.
- The newline character replaces \n.
- The tab character replaces \t.
- The carriage-return character replaces \r.
- The backspace letter replaces \b.
- \\ is substituted with a single backslash (\).