+ 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

6th Nov 2018, 8:25 PM
xpnvdo
xpnvdo - avatar
5 Respuestas
+ 1
I believe its the correct code. Is it not displaying?
6th Nov 2018, 9:57 PM
xpnvdo
xpnvdo - avatar
+ 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
8th Nov 2018, 2:20 AM
Anthony Louis
Anthony Louis - avatar
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.
8th Nov 2018, 3:15 AM
xpnvdo
xpnvdo - avatar
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
8th Nov 2018, 5:36 AM
xpnvdo
xpnvdo - avatar
- 1
I think you linked the wrong code man
6th Nov 2018, 9:34 PM
Michael Vigato
Michael Vigato - avatar