From 649539ef051d249dbbe764a331ed82d351e5df73 Mon Sep 17 00:00:00 2001 From: LeviDing Date: Sun, 18 Oct 2020 22:28:23 +0800 Subject: [PATCH 1/2] FIX: delete extra space --- 1-js/06-advanced-functions/05-global-object/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/06-advanced-functions/05-global-object/article.md b/1-js/06-advanced-functions/05-global-object/article.md index 679db05c..ac37d679 100644 --- a/1-js/06-advanced-functions/05-global-object/article.md +++ b/1-js/06-advanced-functions/05-global-object/article.md @@ -5,7 +5,7 @@ The global object provides variables and functions that are available anywhere. In a browser it is named `window`, for Node.js it is `global`, for other environments it may have another name. -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. +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. 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. From 4131b29d7d64aaf939e8aea425e7894708c2b797 Mon Sep 17 00:00:00 2001 From: LeviDing Date: Mon, 19 Oct 2020 09:26:53 +0800 Subject: [PATCH 2/2] FIX: delete extra space --- 1-js/08-prototypes/01-prototype-inheritance/article.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/08-prototypes/01-prototype-inheritance/article.md b/1-js/08-prototypes/01-prototype-inheritance/article.md index e5780805..53af8391 100644 --- a/1-js/08-prototypes/01-prototype-inheritance/article.md +++ b/1-js/08-prototypes/01-prototype-inheritance/article.md @@ -198,8 +198,8 @@ alert(admin.fullName); // John Smith (*) // setter triggers! admin.fullName = "Alice Cooper"; // (**) -alert(admin.fullName); // Alice Cooper , state of admin modified -alert(user.fullName); // John Smith , state of user protected +alert(admin.fullName); // Alice Cooper, state of admin modified +alert(user.fullName); // John Smith, state of user protected ``` 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.