Haha, this seems like a simple misunderstanding. You return an object, but the toString() method for the [object Object] and it is implicitly called by the freecodecamp console.
Object.prototype.toString ()
var o = {};
You can easily verify that you are actually returning the object using your own code:
function myfunc() { return {"name": "bob", "number": 1}; } var myobj = myfunc(); console.log(myobj.name, myobj.number);
source share