With escape characters, we can add special characters and unicode characters(Hindi,Chinese,Arab,...etc) to HTML page.
All the Javascript escape characters starts with "\".

Character Description
\b Backspace
\f Form feed
\n New line
\r Carriage return
\t Tab
\v Vertical tab
\' Apostrophe or single quote
\" Double quote
\\ Backslash character
\XXX The character with the Latin-1 encoding specified by up to three octal digits XXX between 0 and 377.
For example, \251 is the octal sequence for the copyright symbol.
\xXX The character with the Latin-1 encoding specified by the two hexadecimal digits XX between 00 and FF.
For example, \xA9 is the hexadecimal sequence for the copyright symbol.
\uXXXX The Unicode character specified by the four hexadecimal digits XXXX.
For example, \u00A9 is the Unicode sequence for the copyright symbol

Javascript Escape Characters Example

<html>   
<body>   
<script type="text/javascript">   
var str;
str = "Hello \"World\"";  //double quotes
document.write(str);
document.write("<br>");

str = "Hello \'World\'";  //single quotes
document.write(str);
document.write("<br>");

var path="C:\\test.txt"; //backslash
document.write(path);
document.write("<br>");

str = "\251 Javascript";  //unicode
document.write(str);
document.write("<br>")

str = "\xA9 Mozilla";  //unicode
document.write(str);
document.write("<br>");

str = "\u00A9 Netscape";  //unicode
document.write(str);
document.write("<br>");

str = "Hello \u0022World\u0022";  //doublie quotes with unicode
document.write(str);
document.write("<br>");

str = "\u091C\u093E\u0935\u093E\u0938\u094D\u0915\u094D\u0930\u093F\u092A\u094D\u091F";  //javascript hindi
document.write(str);
document.write("<br>");

str = "\u0C1C\u0C3E\u0C35\u0C3E\u0C38\u0C4D\u0C15\u0C4D\u0C30\u0C3F\u0C2A\u0C4D\u0C1F\u0C41";  //javascript telugu
document.write(str);
document.write("<br>");



function showNewLine()
{
	str = "Hello \n World";  //new line
	alert(str);
}
function showTab()
{
	str ="Hellow World\n"; //without tab
	str += "Hello\t\t\tWorld";  //with tab
	alert(str);
}
</script>   

<br>
<b> New Line, Tab , Carriage return are not show in HTML page. 
So Click the below buttons </b><br/>
<input type="button" value="New Line \n" onClick="showNewLine()"/>
<input type="button" value="Tab \t" onClick="showTab()"/>

</html>