JavaScript String Reference

JavaScript Strings

A JavaScript string stores a series of characters like “John Doe”.

A string can be any text inside double or single quotes:

let carName1 = "Volvo XC60";
let carName2 = 'Volvo XC60';

String indexes are zero-based:

The first character is in position 0, the second in 1, and so on. Continue reading JavaScript String Reference