Skip to content

Commit 7cbc7fe

Browse files
committed
Fix wording in 'this' assignment
1 parent 520ad91 commit 7cbc7fe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

assignments/this.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
// Principle 1
1313

1414
// code example for Window Binding
15-
name = 'window'
15+
name = 'global/window'
1616
globalVar = {
1717
'name': 'Some Object'
1818
};
1919
function windowScope() {
20-
console.log(`Hello, I am ${this.globalVar.name}, these are my contents ${this.globalVar}, and I belong to the ${this.name}! I am also accessible through global.globalVar in node, or window.globalVar in your browser. 'this' in the context used here does not refer to me, but to my parent, because this is used in the lexical context of window/global, since the function that called this information is in the global environment`)
20+
console.log(`Hello, I am ${this.globalVar.name}, these are my contents ${this.globalVar}, and I belong to the ${this.name}! I am also accessible through global.globalVar in node, or window.globalVar in your browser. 'this' in the context used here does not refer to the function, but to the function parent, because 'this' is used in the lexical context of window/global, since the function that called this information is in the global/window environment`)
2121
};
2222
windowScope();
2323

0 commit comments

Comments
 (0)