Thanks for your answer,
I went through that challenge and watched some videos on YouTube and I still don’t understand what kind of difference does it make. I both cases the method is called the same way.
I understand that I am supposed to make a prototype when a property is shared between more instances of an object but I don’t understand why would I do that and write extra code when I can pack that property right into the object.
Because then it’s only on that object. Say you have a type of Object1 (ie one that inherits from Object1). It’s not going to have that. As an example, do something like
> o1 = new Object1();
> o1.toString()
> o1.valueOf()
You didn’t add those methods, yet they are there just the same.
I just copied the two code examples from the OP, I didn’t even realise that the multiply function is actually an add function… but I’m too blind to find the missing parentheses?