I was trying to build myself a small function to simpifly logging to the console in JavaScript. But for some reason it doesn't log the properties of the object, only the type of the logged object ([Object object].
<!-- language: lang-js -->
var randomObject = {
fistname:"peter"
};
function log(message,color){
var color = color || "green";
console.log("%c" + message, "color:" + color + ";font-weight:bold; font-family:'Helvetica Neue'");
}
log(randomObject);
i'm grateful for any help/explanation