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 |
What are screen objects?
How to validate email in javascript?
What is unshift method in JavaScript?
What are the ways of making comments in javascript?
What is use of object as function?
Explain why "self" is needed instead of "this".
What is the difference between let, const, and var?
What is eval() in javascript?
How to use strings as array indexes using javascript?
How do I use javascript to password-protect my web site?
How to get the type of arguments passed to a function?
How do I link an external javascript file to html?