Core JavaScript

Intermediate JavaScript

JavaScript Reference

JavaScript Special Character




JavaScript support special characters to text string using backslash Sign(\).

Following table list is special characters that can add to text string with the backslash sign:

Special Character Description(Output))
\' single quote
\" double quote
\& ampersand
\n new line
\t tab
\\ backslash
\r carriage return
\b backspace
\f form feed

Example-Code:

<script type="text/javascript">
document.write("This Example is \"Double Quota\" Special character");
</script>

Example-Result: