is there any way to print the object using string interpolation method?
const star = {
id: 1,
name: 'Arcturus',
visualMag: -0.05,
};
This method doesnt work
console.log(`${star}`); // [object Object]
This works
console.log(`${star.name}`); // 'Arcturus'
and simply using console.log(star) works