Skip to content

Commit

Permalink
Added advanced this bind
Browse files Browse the repository at this point in the history
  • Loading branch information
khianvictorycalderon committed Dec 5, 2024
1 parent fede311 commit 4af0e9b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Advanced_This.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@


function Greet(Argument_Name) {
this.name = "Hello " + Argument_Name;
}

// Similar to creating objects
const newProp1 = new Greet("Jash");
const newProp2 = new Greet("Vlad");

console.log(newProp1.name);
console.log(newProp2.name);

0 comments on commit 4af0e9b

Please sign in to comment.