OMENSAH
2/12/2018 - 7:13 PM

prototypes.js

var Employee = function(name){
  this.name = name;
}
Employee.prototype ={
  getName: function(){
    return this.name;
  },
  changeName: function(value){
    this.name = value;
  }
}
var e = new Employee("Oliver");
console.log(e.getName());
e.changeName("Nana");