From 9e752536b4e8e269a92765ad3a786737fbc133a0 Mon Sep 17 00:00:00 2001 From: Kumar Sidharth Date: Thu, 1 Feb 2024 15:44:28 +0530 Subject: [PATCH] Correction: jsguide.html - Changed null to undefined ## This change is "Not important". Please don't review this leaving your work behind. ## Change description Keys not defined in an Object are undefined. ``` javascript const o = {width: 42}; o.maxWidth === null // false o.maxWidth === undefined // true ``` --- jsguide.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsguide.html b/jsguide.html index 9aca653..d28bfdb 100644 --- a/jsguide.html +++ b/jsguide.html @@ -1413,7 +1413,7 @@ if (o.hasOwnProperty('maxWidth')) {
/** @type {{width: number, maxWidth: (number|undefined)}} */
 const o = {width: 42};
-if (o.maxWidth != null) {
+if (o.maxWidth != undefined) {
   ...
 }