String.prototype.charAt

Returns a new string that contains a single UTF-16 code unit at the specified index in the string.

Syntax

charAt(index)

Parameters

Return value

A string.

Examples

"spring".charAt(1)
"p"