w3resource

Javascript String Objects - Properties and Methods

Description

JavaScript string object refers to a string.

Can be created by the string constructor.

Javascript String Objects Property

Name Description Version
constructor Specifies the function that creates an object's prototype. Implemented in JavaScript 1.0
length Use to get the length of a string object. Implemented in JavaScript 1.0
prototype
Use to add new properties and methods to an object. Implemented in JavaScript 1.0

Javascript String Objects Methods

Name Description Version
anchor Use to create an HTML anchor that is used as a hypertext target. Implemented in JavaScript 1.0
big Use to display a string in a big font as if it were in <big> tag. Implemented in JavaScript 1.0
blink Use to blink a string. Implemented in JavaScript 1.0
bold Use to display a string bold. Implemented in JavaScript 1.0
charAt Returns the specified character from a string. Implemented in JavaScript 1.0
charCodeAt Returns a number indicating the Unicode value of the character at the given index. Implemented in JavaScript 1.0
concat Use to join the text of two or more strings. Implemented in JavaScript 1.0
fixed Use to display a string in fixed-pitch font. Implemented in JavaScript 1.0
fontcolor Use to display a string in a specified color Implemented in JavaScript 1.0
fontsize Use to display a string in the specified font size Implemented in JavaScript 1.0
fromCharCode Returns a string created by using the specified sequence of Unicode values. Implemented in JavaScript 1.0
indexOf Returns the index within the calling string object of the first occurrence of the specified value Implemented in JavaScript 1.0
italics Use to display a string as italics Implemented in JavaScript 1.0
lastIndexOf Returns the index within the calling String object of the last occurrence of the specified value, or -1 if not found. Implemented in JavaScript 1.0
link Creates an html hypertext link that requests another url. Implemented in JavaScript 1.0
match Use to match a regular expression against a string. Implemented in JavaScript 1.0
replace Used to find a match between a regular expression and a string, and to replace the matched substring with a new substring. Implemented in JavaScript 1.0
search Use to search for a match between a regular expression and a specified string. Implemented in JavaScript 1.0
slice Use to extract a section of a string and returns a new string. Implemented in JavaScript 1.0
small Display a string in a small font. Implemented in JavaScript 1.0
split Use to split a string object into an array of string. Implemented in JavaScript 1.0
strike Display a string as struck-out text Implemented in JavaScript 1.0
sub Causes a string to be displayed as a subscript, as if it were in a SUB tag. Implemented in JavaScript 1.0
substr Returns the characters in a string beginning at the specified location through the specified number of characters. Implemented in JavaScript 1.0
substring Returns the characters in a string between two specified position into a string. Implemented in JavaScript 1.0
sup Display a string as a superscript Implemented in JavaScript 1.0
toLowerCase Use to converts a string to lowercase. Implemented in JavaScript 1.0
toSource Use to get the source code of the object. Implemented in JavaScript 1.0
toString Use to get a string representing the specified object. Implemented in JavaScript 1.0
toUpperCase Use to convert a string to uppercase. Implemented in JavaScript 1.0
valueOf Returns the value of a string object. Implemented in JavaScript 1.0

See also:

JavaScript Core objects, methods, properties.

Previous: JavaScript toString() Method: RegExp Object
Next: JavaScript constructor Property: String Object

Test your Programming skills with w3resource's quiz.



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://www.w3resource.com/javascript/object-property-method/string.php