Skip to content

Commit

Permalink
modified
Browse files Browse the repository at this point in the history
  • Loading branch information
Risyandi committed Jul 16, 2019
1 parent f02828c commit df3dcbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions oop-javascript-practices/simple-example.js
Expand Up @@ -17,10 +17,10 @@ function Employee(age, weight, salary) {
Employee.prototype = new Person;

Employee.prototype.getInfo = function () {
return "I'm " + this.age + " years old" + " and have weight " + this.weight + " kilo" + " and earn " + this.salary + " dollar";
return "I'm " + this.age + " years old" + " and have weight " + this.weight + " kilo" + " and earn " + this.salary + " dollar. ";
}

var Person = new Person(22, 50);
var Employee = new Employee(22, 50, 100);
var Employee = new Employee(25, 55, 100);
console.log(Person.getInfo(), ":value of person");
console.log(Employee.getInfo(), ":value of employee");

0 comments on commit df3dcbc

Please sign in to comment.