DEV Community

Md Shah Jalal
Md Shah Jalal

Posted on

JavaScript String CharAt() methods

CharAt(): The charAt() method returns the character at a specified position in a string.

Syntax:
string.charAt(index)

Example:

let text = “Charecter”;
text.charAt(0);
Enter fullscreen mode Exit fullscreen mode

The output will be “C”

And again

text.charAt(3);
Enter fullscreen mode Exit fullscreen mode

The output will be “r”

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay