object inside object javascript

JavaScript
person = {
    'name':'john smith'
    'age':41
};

console.log(person);
//this will return [object Object]
//use
console.log(JSON.stringify(person));
//insteadvar obj = {
  prop1: 5,
  obj2: {
    prop1: [3, 6, 3],
    prop2: 74,
    prop3: {
      str: "Hello World"
    }
  }
};

console.log(obj.obj2.prop3.str); //output: "Hello World"let object = {
  'key1': 'value1',
  'key2': 'value2',
  'keyn': 'valuen',
};
console.log(object);var mycar = new Car('Eagle', 'Talon TSi', 1993);
function Car(make, model, year) {
  this.make = make;
  this.model = model;
  this.year = year;
}

Source

Also in JavaScript: