I've looked around but can't find a definitive answer.. I'm new to Javascript so hoping to find an answer in simple terms
I'm learning about toString / valueOf, which are described as essentially doing the same thing
Can someone please explain why these need to be used at all? E.g. in the below code, why do you need valueOf / toString if document.write(array); will do the same thing?
var array= ["James Jones", "123 Street", 500.20];
document.write(array.toString());