#Javascript #Tutorial #Hindi

Link for Complete JavaScript Tutorial in Hindi for Beginners: https://www.youtube.com/playlist?list=PLjpp5kBQLNTSvHo6Rp4Ky0X8x_MabmKye

Link for Complete HTML and CSS Tutorial in Hindi for Beginners: https://www.youtube.com/playlist?list=PLjpp5kBQLNTSdLVVjU_kea8J8lP24ZseT

In this video i will talk about object constructor function in javascript.



Object Types (Blueprints) (Classes)

Sometimes we need a "blueprint" for creating many objects of the same "type". The way to create an "object type", is to use an object constructor function.

Objects of the same type are created by calling the constructor function with the new keyword.

In JavaScript, the thing called this is the object that "owns" the code. The value of this , when used in an object, is the object itself. In a constructor function this does not have a value. It is a substitute for the new object.

Note: It is considered a good practice to capitalize the first letter of your constructor function.

The constructor property returns a reference to the Object constructor function that created the instance object. Note that the value of this property is a reference to the function itself, not a string containing the function's name.


Please subscribe to watch more videos like this: https://www.youtube.com/channel/UCWCGvAu1NDCldmLasELk62g?sub_confirmation=1



Join this channel to support Tech Gun:
https://www.youtube.com/channel/UCWCGvAu1NDCldmLasELk62g/join