Display an object in the Console
A JavaScript object is not automatically readable text. This small example shows the difference between writing an object into the page and logging it for development.
const user = { name: 'Yugien' };
document.write(user);
console.log(user);
The page displays [object Object] because the object is converted to a short string. Open the browser's developer tools and choose Console to inspect the object's name property.
For a real user interface, choose the values you want to show and insert them into the page deliberately. Keep Console output for development checks.