diff --git a/app.js b/app.js index 872414d..8cc90ad 100644 --- a/app.js +++ b/app.js @@ -1,11 +1,7 @@ -let message = { - name: 'John', - regularFunction: function() { - console.log(this) - console.log('Hello ' + this.name); - }, - arrowFunction: () => console.log(this) -} +let person1 = {name: 'John', age: 22}; +let person2 = {name: 'Mary', age: 26}; -message.regularFunction(); -message.arrowFunction(); // \ No newline at end of file +let sayHi = function() { + console.log('Hi, ' + this.name); +}; +sayHi.call(person1); \ No newline at end of file