The prototype property allows you to add properties and methods to any object (Number, Boolean, String and Date etc.).
Note − Prototype is a global property which is available with almost all the objects.
Use the following syntax to use Prototype.
object.prototype.name = value
Try the following example to use the prototype property to add a property to an object.
Book title is : Perl Book author is : Mohtashim Book price is : 100