charat function to get character from a location inside a string

We can collect the character within a string by specifying its location inside the string. For this we will use charat function. This function takes data of the location and returns the particular character at that location.

Note that the first character is located at 0th position. Here is an example.

var my_str="Welcome to"
The output of above code is c
Learn how to reverse a string by using charat and length property of a string.

Subscribe to our YouTube Channel here


* indicates required
Subscribe to plus2net

    Post your comments , suggestion , error , requirements etc here .

    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2023 All rights reserved worldwide Privacy Policy Disclaimer