How to use a String literal In ES6
Syntax:
let str = "w3wiki";
Example:
Javascript
let str = "Geeks" console.log(str); let str1 = "JavaScipt" console.log(str1); |
Output
Geeks JavaScipt
ES6 String
ES6 string is an object that is used to represent a sequence of characters or manipulate the character’s sequence and It can contain zero or more characters within quotes. The text within the single or double quotes is called a string in Javascript.
Contact Us