Use of getters and setters with a car information example
JavaScript provides a analogy to private properties, but you should think of them as hidden as they do not behave as private properties. Protoptyped methods do not have access to hidden properties. 

Properties defined with the "this" token are public and can be accessed anywhere the object can be accessed. Private properties are declared with the var token or as the objects passed parameters and should never require direct getting and setting

function MyObject (id, name) {
    this.id = id;                     // create public property
    var displayVal = "Hi I am "+name; // create Hidden property
    this.display = function () {      // create public function 
         console.log(displayVal);     // this function closes over displayVal
    }
    // closure closes over all currently scoped variables thus
    this.displayName = function () {
         console.log(name)     // the argument passed to this object is also 
                               // available as a hidden property 
    }
}
MyObject.prototype.test = function () { // this prototype does not close over
                                        // the property displayVal
      // the next line will display undefined
      console.log(displayVal);  // undefined
}
var myObj = new MyObject(0, "OBJECT"); // creates a new object
console.log("Public id = " + myObj.id);  // accessing public property
myObj.display();                         // display private property       

// hidden properties are not enumerable        
for(var i in myObj){
    console.log(i + " as " + (typeof myObj[i]) );    // will report
                       // id as number
                       // display as function
                       // displayName as function
                       // test as function
}      
// Note no hidden variables are displayed


JavaScript is a classless language and attempting to transfer class like concepts to it from other languages is bad practice. Use closure to define private (hidden) properties.

Object factories in my view are bad design, they slow down an already slow language and provide no extra benefit to the code.