JavaScript: String.prototype.charAt

By Xah Lee. Date: . Last updated: .
str.charAt(index)
Return a string of length 1 that's the String Code Unit at index index of str. Return empty string if index is out of bound.
console.log("abc".charAt(0) === "a");

If index is out of bound, return empty string.

console.log("abc".charAt(9) === ""); // true
BUY
ΣJS
JavaScript in Depth

JavaScript String, Char, Encoding, Hexadecimal