What is constructor?



What is constructor? ..

Answer / susheel kumar

A constructor is a special type of member function for
automatic initialization of an object.
when ever an object is created the constructor will be
executed automatically.
the name of constructor same as that of its class.the
constructor is declared with no return type,not even void.
constructor should be declared in the public section most
of the time.

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More JavaScript Interview Questions

What is the difference between JavaScript and jscript?

0 Answers  


What is purpose of onerror event handler in javascript?

0 Answers  


What boolean operators does JavaScript support?

5 Answers   Aptech, HCL, Satyam,


What is the use of type of operator?

0 Answers  


Write JavaScript code to use file system in binary format?

0 Answers  






Why is object naming important to use in javascript?

0 Answers  


How can javascript codes be hidden from old browsers that don't support javascript?

0 Answers  


What does “1?+2+4 Evaluate to? What about 5 + 4 + “3??

0 Answers  


How to add a new property in existing function javascript?

0 Answers  


How can I prevent others from reading/stealing my scripts or images?

0 Answers  


What is differential inheritance?

0 Answers  


How to create a function in javascript?

0 Answers  


Categories