SQL PHP HTML ASP JavaScript articles and free scripts to download
 

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 www.plus2net.com"
document.write(my_str.charAt(3))

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

Found anything wrong or wants to improve the code by adding more features? Post your short comment here or use the Forum



Post Comment This is for short comments only. Use the forum for more discussions.
Name
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked

Join Our Email List
Email:  
For Email Newsletters you can trust
String Functions
HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us

©2000-2013 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer