Learn JavaScript
String Methods

Accessing String Characters

We can access any character from a string by using its position in the string. We use square brackets [] for this. The position count starts from 0. Since, S is at position 0 in the string name and can be accessed thus: name[0].