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.
Run the code sample to see how both single-qoute and double-quote strings work the same.
Output (Console)