The charAt()
method is used to find a character at a certain place from a string.
string.charAt(position)
const message = 'Hello from Scan Skill';
console.log(message.charAt(4)); // Prints: o
From the above example, we can see the charAt()
method. The string is also zero-indexed so the item at the 4th
index is o
instead of l
.