get first elements from a string code example
Example 1: get first character of string java
var string = "freeCodecamp";
string.charAt(0); // Returns "f"
Example 2: python get first character of string
string = 'This is a string'
print(string[0])
#output: 'T'