Skip to content

Commit 3d7be40

Browse files
committed
Merge pull request DrkSephy#51 from LarryBattle/master
Fixed syntax error in ES5 Personal example
2 parents 14c9861 + 72f821e commit 3d7be40

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,9 @@ function Personal(name, age, gender, occupation, hobby) {
614614
Personal.prototype = Object.create(Person.prototype);
615615
Personal.prototype.constructor = Personal;
616616
Personal.prototype.incrementAge = function () {
617-
return Person.prototype.incrementAge.call(this) += 20;
617+
Person.prototype.incrementAge.call(this);
618+
this.age += 20;
619+
console.log(this.age);
618620
};
619621
```
620622

0 commit comments

Comments
 (0)