String is a sequence or series of characters can contain letter, digit or symbols enclosed in single quotes, double quotes or inside back ticks.
String is a primitive data type but with String() constructor, string object can also be created. Javascript supports Unicode characters, Hence any language characters or symbols can be used.
Double quote string
<script>
let greetings = "Hello world"; // double quote
</script>
Single quote string
<script>
let greetings = 'Hello world'; // single quote
</script>
Both strings inside double quote and in single quote are same.
Template string literals
String inside back ticks is template string introduced in ES6 (JavaScript 2016), Single quotes and double quotes can be used inside template string. Multiline string can be created with Template string.
Template string with double and single quote string
<script>
let greetings = `Hello world "Good" 'Morning' `;
</script>
Multiline string with Template string
<script>
let greetings = `Hello world
"Good" 'Morning'
How are you? `;
</script>
Concatenate two or more strings
<script>
let a = 'Hello ';
let b = 'world';
let c;
c= a + b + ' Good Morning';
document.write(c);
</script>
Adding two or more strings with + operator called concatenation and + operator is called concatenation operator.
String objects
Javascript also provides String() constructor. it creates a new string object.
<script>
let name = new String("yourshala");
</script>