Escape Notation

Several special characters can be included within strings by escaping them with \.

\0the NULL character

\'single quote

\"double quote

\\backslash

\nnew line

\rcarriage return

\vvertical tab

\ttab

\bbackspace

\fform feed

\uXXXXunicode codepoint

\u{X} ... \u{XXXXXX}unicode codepoint

\xXXthe Latin-1 character

Notice how the number of characters of a string can be obtained with the .length property. Notice also how [] is used to access individual characters of a string.
var a = "\\\uFFFF";
console.log(a[0]);
console.log(a.length);

var b = "你好吗?";
console.log(b.length);

var c = "\n\n\n X";
console.log(c.length);
// var c = "\"; // SyntaxError

function capitalizeFirstLetter(string) {
  return string[0].toUpperCase() + string.slice(1);
}

\ 2 4 5
<a href="JavaScript%20is%20a%20superset%20of%20JSON">JavaScript is a superset of JSON</a>, as of ES10.
const paragraph_separator = "\u2028";
const line_separator = "\u2029";
let code = '"\u2028\u2029"';

console.log(JSON.parse(code));
eval(code); // throws a SyntaxError in old engines

evaluates to "\u2028\u2029" in all engines