|
| JAVASCRIPT charAt() METHOD
In javascript, the charAt() method returns the character at a specified index position.
The general format is:
string.charAt(index);
Index is the position as a number.
Example:
<script type="text/javascript">
var string="Good morning John";
document.write(string.charAt(3));
</script>
The above will output d as d is at position 3. Remember the first character is always at position 0:
See Also:
|
|