How to use index to access char in a String
char index
We can access an individual character with bracket notation and a numeric index:
Example
var stringValue = "hello world";
console.log(stringValue[1]); //"e"
The code above generates the following result.