Sure, to convert an object into a string, we either have to use our own method, such as:
Actually, the above just shows the general approach; we may wish to use something like or, if we are not using methods (functions as properties of our object), we may be able to use the new standard (but not implemented in older browsers, though we can find a utility to help with it for them too), JSON.stringify(). But again, that won't work if the object uses functions or other properties which aren't serializable to JSON
Keeping it simple with console, we can just use a comma instead of a +. The + will try to convert the object into a string, whereas the comma will display it separately in the console. Example:
EDIT Do not use this answer as it does not work in Internet Explorer. Use Gary Chambers solution. toSource() is the function we are looking for which will write it out as JSON.