Other way of use console.log()

Hi, the common way to console our variables when we are coding is something like this:

const myName = "Cristina Elizabeth";
console.log("myName", myName);

Our result is:

That manner is correct! but you can save time using this way:

const myName = "Cristina Elizabeth";

console.log({ myName });

Result:

By Cristina Rojas.