A JavaScript string stores a series of characters like "John Doe". A string can be any text inside double or single quotes: var carName1 = "Volvo XC60"; var carName2 = 'Volvo XC60'; String indexes are zero-based: The first character is in position 0, the second in 1, and so on.
A string in javascript stores the series of characters and it can be a text inside single or double quotes like "phptpoint" and 'phptpoint' so in the first character is in the 0 positions and 2nd is 1.