Creating javascript objects from different files

后端 未结 9 2914
眼角桃花
眼角桃花 2021-02-20 11:15

I\'ve been trying to do javascript for sometime now, but i want it to be \"object-orientated\" so I\'m trying to create different javascript classes in different files and try t

9条回答
  •  你的背包
    2021-02-20 12:00

    You need to return the object created by Person in order for it to constitute a new instance of the Person prototype.

    return(this);
    

提交回复
热议问题