Javascript TutorialJavascript StringsJavascript StringsStrings are used to represent text. which is a sequence of characters enclosed in quotes (either single quotes or double quotes).Examples of string literals:let message = "Hello, CSC!"; // using single quoteslet name = "CSC"; // using double quoteslet str = ""; // an empty stringString LengthIn JavaScript, you can get the length of a string using the length property. The length property returns the number of characters in the string.As an example:const str = "Hello, world!";console.log(str.length); // Output: 13In this example:The length property returns 13, which is the number of characters in the string 'Hello, world!'.Escape CharacterAn escape character is a backslash () followed by a character. The backslash tells JavaScript to treat the character that follows in a special way.Here are some common escape characters in JavaScript:\' - single quote\" - double quote\\ - backslash\n - newline\t - tab\b - backspace\r - carriage return\f - form feedThis example showcases the application of several escape characters:const str = 'She said, "Don\'t forget to buy milk."';console.log(str); // Output: She said, "Don't forget to buy milk."In this example:The string contains a double quote and a single quote.To include the single quote within the string, we used the escape character \ before the single quote.String ExampleEditorLoading...Run Example >>