In programming, we often work with text. The technical term for text in JavaScript is string. A string is one of the basic data types in JavaScript.
As we learned earlier, strings are enclosed in quotes, like "Hello" or 'World'. We have been using double quotes so far, but in JavaScript, you can use either single or double quotes.
Strings are used extensively in computer programs. This text you're reading is a string. The title of this lesson "Working with Strings" is another string. The code sample associated with this lesson is also a string.
Run the code sample to see how both single-qoute and double-quote strings work the same.
Output (Console)