//Add private properties and methods in constructor mode
function Person(name, age, address) {
this.name = name;
this.age = age;
this.address = address;
}
//Add public in prototype way Properties, methods
Person.prototype = {
constructor: Person,
showName: function () {
alert(this.name this.age this.address);
}
}
//Use
var person = new Person("zhangsan", 22, "Beijing, China!");
person.showName();