\) is used to insert apostrophes, new lines, quotes, and other special characters into a text string.
The JavaScript on the right has an error because there are double quotes in a pair of double quotes.
To solve this problem, you must place a backslash (\) before each double quote in “North.”
This turns each double quote into a string literal.
|
|
| Code | Output |
|---|---|
\' |
single quote |
\‶ |
double quote |
\\ |
backslash |
\n |
new line |
\r |
carriage return |
\t |
tab |
\b |
backspace |
\f |
form feed |
|
What did the fish say when he swam into a wall? “Dam(n).” — Rory Scovel |