freeCodeCamp/guide/english/javascript/standard-objects/string/index.md

856 B

title
String

String

In JavaScript the String global object is a constructor for strings, which store series of characters. Strings can be created in the form of literals, such as var greeting = "Hi, campers!"; or using the String constructor: var greeting = new String("Hi, campers!");.

Unlike some other languages, JavaScript doesn't care if you use single ' ' or double " " quotes for strings. You can even use them inside the strings, they just have to be different from the quotes that embrace the string "Isn't that awesome?".

More Information:

MDN web docs w3schools.com