Skip to content

Commit 2b861b6

Browse files
committed
es6 classes
1 parent 0516f34 commit 2b861b6

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

es6/module2.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,17 @@
1919
console.log(`${this.name} is a really cool ${this.title}`);
2020
}
2121
}
22-
let object = new Person("Seun Daramola", "Computer Instructor");
23-
object.displayData();
22+
// let object = new Person("Seun Daramola", "Computer Instructor");
23+
// object.displayData();
24+
25+
//Class Inheritance Introduced with es6
26+
class Alien extends Person {
27+
constructor(){
28+
super ("Seun Daramola", "guy");
29+
}
30+
}
31+
let alien = new Alien();
32+
alien.displayData();
2433

2534
</script>
2635

0 commit comments

Comments
 (0)