From 448320ed8f0fb27b0939598cd0fd4478fef7eb9b Mon Sep 17 00:00:00 2001 From: Suyash Purwar Date: Sun, 25 Dec 2022 11:29:23 +0530 Subject: [PATCH] Update commens in few code snippets In the Non-writable and Non-configurable section, the comments in few of the code snippets says 'Error' but that is only the case when the 'strict' mode is enabled. I understand that it is also mentioned but I felt it should be reflected in the code snippet as well so that the reader is absolutely clear. --- 1-js/07-object-properties/01-property-descriptors/article.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/07-object-properties/01-property-descriptors/article.md b/1-js/07-object-properties/01-property-descriptors/article.md index 0a945b377b..b29e8c1df4 100644 --- a/1-js/07-object-properties/01-property-descriptors/article.md +++ b/1-js/07-object-properties/01-property-descriptors/article.md @@ -141,7 +141,7 @@ Object.defineProperty(user, "name", { }); alert(user.name); // John -user.name = "Pete"; // Error +user.name = "Pete"; // Error (in strict mode, otherwise ignored) ``` ## Non-enumerable @@ -244,7 +244,7 @@ Object.defineProperty(user, "name", { }); user.name = "Pete"; // works fine -delete user.name; // Error +delete user.name; // Error (in strict mode, otherwise ignored) ``` And here we make `user.name` a "forever sealed" constant, just like the built-in `Math.PI`: