Sunday, January 12, 2014

String Manipulating - JavaScript

String Manipulating Method
JavaScript

charAt(n) returns the character at the specified (n) index in a string. The index of the first character is 0, the second character is 1, and so on.

indexOf(‘’) Returns the position of the first found occurrence of a specified value in a string.

substr() Extracts the characters from a string, beginning at a specified start position, and through the specified number of character.

substring(a,b) Extracts the characters from a string, between two specified indices.

split(‘’) Splits a string into an array of substrings

No comments:

Post a Comment