person = { 'name':'john smith' 'age':41 }; console.log(person); //this will return [object Object] //use console.log(JSON.stringify(person)); //instead
function func() { return { name: "Name", age: 34 }; }
var mycar = new Car('Eagle', 'Talon TSi', 1993);
function Car(make, model, year) { this.make = make; this.model = model; this.year = year; }