Skip to content

Commit a4687aa

Browse files
committed
init
1 parent 6ff742e commit a4687aa

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

functions/constructor-function.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,11 @@ personThree.getAge = function () {
5252
return `Age: ${this.age}`;
5353
};
5454
console.log(personThree.getAge());
55+
56+
console.log("---------------------");
57+
58+
function Cat(name) {
59+
this.name = name;
60+
}
61+
const myCat = new Cat("Rob"); // {name: Rob}
62+
console.log(myCat.name); //Rob

functions/inheritance-constructor-function.js

Whitespace-only changes.

0 commit comments

Comments
 (0)