String.prototype.charAt() - JavaScript | MDN

developer.mozilla.org

Tin mới

HTML: Markup language

See all HTML references

Date & time formats

See all HTML guides

CSS: Styling language

See all CSS references

See all CSS guides

Centering an element

JavaScript: Scripting language

Standard built-in objects

Expressions & operators

Statements & declarations

See all JavaScript references

Control flow & error handing

Loops and iteration

Working with objects

See all JavaScript guides

Web APIs: Programming interfaces

Service worker API

Using the Web animation API

Using the Fetch API

Working with the History API

Using the Web speech API

All web technology

Progressive web apps

Learn web development

Getting started modules

Structuring content with HTML module

CSS styling basics module

Dynamic scripting with JavaScript module

Border-image generator

Border-radius generator

Box-shadow generator

Color format converter

String.prototype.codePointAt()

The charAt() method of String values returns a new string consisting of the single UTF-16 code unit at the given index.

String.fromCodePoint()

The charAt() method of String values returns a new string consisting of the single UTF-16 code unit at the given index.

Converted to an integer

Zero-based index of the character to be returned. Converted to an integer — undefined is converted to 0.

UTF-16 characters, Unicode code points, and grapheme clusters

Characters in a string are indexed from left to right. The index of the first character is 0, and the index of the last character in a string called str is str.length - 1.

String.prototype.indexOf()

String.prototype.lastIndexOf()

String.prototype.charCodeAt()

String.prototype.split()

Learn how to contribute

This page was last modified on Jul 10, 2025 by MDN contributors.

toLocaleLowerCase()

toLocaleUpperCase()

[Symbol.iterator]()

[Symbol.hasInstance]()

__defineGetter__()

__defineSetter__()

__lookupGetter__()