ES6 - Boolean Property Prototype
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 create a Boolean prototype.
object.prototype.name = value
The following example shows how to use the prototype property to add a property to an object.
The following output is displayed on successful execution of the above code.
Book title is : Perl Book author is : Tom Book price is : 100