var showKeys = function(obj){ var keys = []; for(var key in obj){ keys.push(key.toString() + " "); } console.log("{ " + keys + "}"); }