toString function for an object with key:value pairs.

Reason for making this was that I wanted to print out some objects to the console, that might be concatenated with strings. if you try to just say window.console.log(someObject), then what gets put out is the string representation of that object, complete with key value pairs and brackets and commas, etc.

if you try to do the same thing, but with a string concatenated with it, like:
`window.console.log("some text" + someObject);`
then you get this echoed out:
`"some text [object Object]"`
I wanted the string representation complete with brackets, commas, key and value pairs, etc., so I wrote this function
so, now I can do:
window.console.log("some text" + objectToString(someObject));