Skip to content

Commit 38cbe74

Browse files
authored
Create Inheritance.js
1 parent fc7e500 commit 38cbe74

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Inheritance.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
class surname {
2+
constructor() {
3+
console.log("kumari 💫");
4+
}
5+
}
6+
7+
class Name extends surname {
8+
constructor() {
9+
console.log("Riya");
10+
super();
11+
}
12+
}
13+
14+
const user = new Name();

0 commit comments

Comments
 (0)