DEV Community

Harish raj
Harish raj

Posted on

29/09/2026 in payilagam

today learn about constructor .JavaScript Constructor Method A constructor in JavaScript is a special function used to create and initialize objects. It sets up object properties and is typically invoked using the new keyword. Constructors allow for the creation of multiple instances with similar properties and methods. Object.create() function in JavaScript
Object.create() in JavaScript is used to create a new object by setting an existing object as its prototype. Instead of copying properties directly or invoking a constructor, it establishes prototype-based inheritance, allowing the new object to access properties and methods from the specified prototype.

Top comments (0)