how to return an object in javascript

JavaScript
function Car(make, model, year) {
  this.make = make;
  this.model = model;
  this.year = year;
}
var mycar = new Car('Eagle', 'Talon TSi', 1993);
function func() {
  return {
    name: "Name",
    age: 34
  };
}
Source

Also in JavaScript: