node js console log object

const myObject = {
  name: 'John',
  age: 30,
  city: 'New York'
};

console.log('My Object:', myObject);
  1. Declare a constant variable myObject and assign it an object with three key-value pairs: name with the value 'John', age with the value 30, and city with the value 'New York'.

  2. Use console.log to print a message and the content of the myObject variable to the console. The message is a string literal: 'My Object:', followed by the value of myObject.