Javascript Reference - JavaScript String prototype Property








We can use the prototype property to add new properties and methods to String type.

Browser Support

prototype Yes Yes Yes Yes Yes

Syntax

object.prototype.name = value

Return Value

A reference to the String.prototype object.