Computer Science, asked by Vaishnavikeshri2999, 1 year ago

What is a constructor method in JavaScript?

Answers

Answered by 9670970008
0
what is a constructor method in a javascript

Results in English

क्या एक जावास्क्रिप्ट में एक निर्माता विधि है

Featured snippet from the web

Constructor is used to create an Object, with some values or can be a default/empty constructor in a OOP Language. Now in javascript a constructor is used when you are doing or working with Prototype objects or Object Oriented Javascript.
Answered by Shukruthi
0

Answer

In Java Script, the thing is called the object that "owns" the code. The value of this , when used in an object, is the object itself. In a constructor this function does not have a value . The value of this will become the new object when a new object is created.

Hope this answer helps you

Please mark me as brainliest

Similar questions