After post about substring() method and split() method, now I still play with string manipulation, and today I use charAt() method. In JavaScript charAt() method used to retrieve character at the index of strings. The pattern is:
stringObject.charAt(Index)
Index is numeric value where the location of character which need to retrieved. Example:
1: <script type="text/javascript">//<![CDATA[
2: var sObj ="String Manipulation";
3: alert( sObj.charAt(5) );
4: //]]></script>
The result for script above is "g", without double quotes.



Post a Comment