Prototype vs. Not, what are benefits?

前端 未结 3 727
猫巷女王i
猫巷女王i 2020-12-19 04:18

Here I made two objects; one has accessor methods created in the constructor, the other in the prototype. Why would one choose one of these over the other?

f         


        
3条回答
提交回复
热议问题