Skip to content

Commit 3897d24

Browse files
authored
Merge pull request javascript-tutorial#2214 from leviding/patch-29
FIX: delete extra space
2 parents c8edd84 + 4131b29 commit 3897d24

File tree

2 files changed

+3
-3
lines changed
  • 1-js

2 files changed

+3
-3
lines changed

1-js/06-advanced-functions/05-global-object/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The global object provides variables and functions that are available anywhere.
55

66
In a browser it is named `window`, for Node.js it is `global`, for other environments it may have another name.
77

8-
Recently, `globalThis` was added to the language, as a standardized name for a global object, that should be supported across all environments. It's supported in all major browsers.
8+
Recently, `globalThis` was added to the language, as a standardized name for a global object, that should be supported across all environments. It's supported in all major browsers.
99

1010
We'll use `window` here, assuming that our environment is a browser. If your script may run in other environments, it's better to use `globalThis` instead.
1111

1-js/08-prototypes/01-prototype-inheritance/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ alert(admin.fullName); // John Smith (*)
198198
// setter triggers!
199199
admin.fullName = "Alice Cooper"; // (**)
200200

201-
alert(admin.fullName); // Alice Cooper , state of admin modified
202-
alert(user.fullName); // John Smith , state of user protected
201+
alert(admin.fullName); // Alice Cooper, state of admin modified
202+
alert(user.fullName); // John Smith, state of user protected
203203
```
204204

205205
Here in the line `(*)` the property `admin.fullName` has a getter in the prototype `user`, so it is called. And in the line `(**)` the property has a setter in the prototype, so it is called.

0 commit comments

Comments
 (0)