Escape Sequence Character in JavaScript

Escape Sequence Character in JavaScript
Rating: 5 - 1 Votes

Escape Sequence Character in JavaScript

JavaScriptIn JavaScript, we have some characters which have some special meaning.  For example, a string is always surrounded by double quotation marks or single quotation marks.  First quotation mark determines the start of a string and second quotation mark determines the end of a string.

But in case, you want to write a string on the document which contains either double quotation mark or single quotation mark then that is not possible.  In such cases, we make use of escape sequence character which is backslash(\).  An example of such scenario is given below.  To get complete list of escape sequences, please Click Here.