Home >>JavaScript String Methods

JavaScript String Methods

Javascript String Methods & Properties

String Properties

Property Description
constructor It is used to return the constructor function of string.
length It is used to return the length of a string.
prototype It is used to add properties and methods to an object.

String Methods

Method Description
charAt() It is used to return the character at the defined position.
charCodeAt() It is used to return the Unicode of the character at the defined index.
concat() It is used to joins two or more strings and return a new string.
endsWith() It is used to check if a string ends with defined string or characters.
fromCharCode() It is used to convert Unicode values to characters.
includes() It is used to check if a string contains the defined string or characters.
indexOf() It is used to return the position of the first found occurrence of a defined value in a string.
lastIndexOf() It is used to return the position of the last found occurrence of a defines value in a string.
localeCompare() It is used to compare two strings in the current locale.
match() It is used to search a string for a match against a regular expression and return the matches.
repeat() It is used to return a new string with a defines number of copies of an existing string.
replace() It is used to search a string for a defined value or a regular expression and return a new string where the defined value are replaced.
search() It is used to search a string for a defined value or regular expression and return the position of the match.
slice() It is used to extract a part of a string and return a new string.
split() It is used to split a string into an array of substrings.
startsWith() It is used to check if a string begins with defined characters.
substr() It is used to extract the characters from a string beginning at a defined start position and through the defined number of characters.
substring() It is used to extract the characters from a string, between two defined indices.
toLocaleLowerCase() It is used to convert a string to lowercase letter according to the host's locale.
toLocaleUpperCase() It is used to convert a string to uppercase letter according to the host's locale.
toLowerCase() It is used to convert a string to lowercase letters.
toString() It is used to return the value of a String object.
toUpperCase() It is used to convert a string to uppercase letters.
trim() It is used to remove the whitespace from both ends of a string.
valueOf() It is used to return the primitive value of a String object.

String HTML Wrapper Methods

Method Description
anchor() It is used to create an anchor.
big() It is used to display a string using a big font.
blink() It is used to display a blinking string.
bold() It is used to display a string in bold.
fixed() It is used to display a string using a fixed-pitch font.
fontcolor() It is used to display a string using a defined color.
fontsize() It is used to display a string using a defined size.
italics() It is used to display a string in italic.
link() It is used to display a string as a hyperlink.
small() It is used to display a string using a small font.
strike() It is used to display a string with a strikethrough.
sub() It is used to display a string as subscript text.
sup() It is used to isplay a string as superscript text.

JavaScript String Methods Index

Sr.No. Topics
1 JavaScript String charAt() Method
2 JavaScript String charCodeAt() Method
3 JavaScript String concat() Method
4 JavaScript String constructor Property
5 JavaScript String endsWith() Method
6 JavaScript String fromCharCode() Method
7 JavaScript String includes() Method
8 JavaScript String indexOf() Method
9 JavaScript String lastIndexOf() Method
10 JavaScript String length Property
11 JavaScript String localeCompare() Method
12 JavaScript String match() Method
13 JavaScript String Prototype Property
14 JavaScript String repeat() method
15 JavaScript String replace() Method
16 JavaScript String search() Method
17 JavaScript String slice() method
18 JavaScript String split() Method
19 JavaScript String startsWith() Method
20 JavaScript String substr() Method
21 JavaScript String toLocaleLowerCase() Method
22 JavaScript String toLocaleUpperCase() Method
23 JavaScript String toLowerCase() Method
24 JavaScript String toString() Method
25 JavaScript String toUpperCase() Method
26 JavaScript String trim() Method
27 JavaScript String valueOf() Method
28 JavaScript String substring() Method