Ok, so now you understood what prototype is in JavaScript but what is the use of it ? If you add any property to it, it will reflect to all objects which are associated with it. Constructor way new Const() – If we are creating our object by using any constructor function, then the Constructor prototype will become our object property is dynamic in nature.Copy Code var obj = Object.create( null)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |