Javascript Prototype Property

The prototype property of string object allows you to add properties and methods to an object. Use it for example to add method or property to string object.

Syntax

Javascript Prototype Property Example

This will produce following result