String Function charAt()
Method or Function: charAt(int)
Syntax: String.charAt(int)
This method takes an integer value as an argument and returns the character of the position of that variable. The position of the string starts from zero(0).
Example
<script type="text/javascript">
var x = "This is a charAt() example";
var y = x.charAt(8);
document.write(y);
</script>
var x = "This is a charAt() example";
var y = x.charAt(8);
document.write(y);
</script>
No comments:
Post a Comment