+ 4
Difference between these methods?
What is the difference, if any, between the way these three objects function? Would there be any reason for choosing one over the other?Or is it just preference? https://code.sololearn.com/W3MHOneEP3L2/?ref=app
5 Antworten
+ 1
I believe its the correct code. Is it not displaying?
+ 1
In third method you could use to write some things tha are not properties of thing objects... when you add methods using prototype, you change all variables that are Thing2, you can create variables and functions wich are shared between them
0
Thanks for the clarification. So in essence they do they same thing, it just depends on what I plan to do later which should determine how to go about the object construction.
0
I happened across this while randomly viewing codes, it goes into great detail and has good examples about just this. Thanks Alquen for this helpful code.
https://code.sololearn.com/Wq3Zseudy3f7/?ref=app
- 1
I think you linked the wrong code man