Freshers Aptitude technical questions
Freshers Job Alert
Bookmark and Share

•  JavaScript Special Characters

The backslash (\) is used to insert apostrophes, new lines, quotes, and other special characters into a text string.

The table below lists other special characters that can be added to a text string with the backslash sign:

Code

Outputs

\'

single quote

\"

double quote

\&

Ampersand

\\

Backslash

\n

new line

\r

carriage return

\t

Tab

\b

Backspace

\f

form feed