Strings

Get hands-on experience on how to use strings as a JavaScript data type.

Strings

Strings, another basic data type, represent a string (or sequence) of characters. Strings are how we represent text values in our code.

Strings can be created by wrapping text in single ('') or double ("") quotation marks.

Press + to interact
var text = "Hey there, this is a JavaScript string!";
var alsotext = 'Hey there, another string!';
console.log(text);
console.log(alsotext);

String operations #

Operations on strings are limited. For instance, you cannot ...