Skip to content

Commit e0699b1

Browse files
committed
Inheritance implemented
1 parent 6df6a1b commit e0699b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js-inheritance.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function Person (age, name) {
77
}
88

99
function Teacher (age, name, sex){
10-
Person.call(this, age, name);
10+
Person.call(this);
1111
this.sex = sex;
1212
this.getInfo = function () {
1313
console.log(`Name: ${this.name} Age: ${this.age} Sex: ${this.sex}`)

0 commit comments

Comments
 (0)