JavaScript Objects The Strings Object- Prototype - Javascript Objects

What is JavaScript Object - prototype?

The prototype property permits 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 most of the objects.

Syntax

Use the below syntax to use Prototype.

Example

Try the below example to use the prototype property to add a property to an object.

Output

Book title is : Perl

Book author is : Mohtashim

Book price is : 100


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Javascript Objects Topics