Easy Tutorial
❮ Met Dialog Close Met Document Createcomment ❯

JavaScript Date prototype Property

JavaScript Date Object

Example

Creating a new date object method:

Create a Date object, call the object's myMet method:

monthname Output result:


Definition and Usage

The prototype property allows you to add properties and methods to objects.

When constructing a prototype, all date objects will have properties and methods added by default.

Note: Properties and methods can be added to the prototype, but you cannot assign a different prototype to the object. However, a new prototype can be assigned to user-defined objects.

Note: Prototype is a global property, which is applicable to almost all JavaScript objects.


Browser Support

All major browsers support the prototype property.


Syntax


JavaScript Date Object

❮ Met Dialog Close Met Document Createcomment ❯