JavaScript String Object
The prototype property allows you to add properties and methods to an object.
Note: Prototype is a global property which is available with almost all JavaScript objects.
![]()
The prototype property is supported in all major browsers.
Use the prototype property to add a property to an object:
The output of the code above will be:
JavaScript String Object
Your message has been sent to W3Schools.