You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|12 |[Count elements in an array](#Count-elements-in-an-array)|
19
+
|13 |[Aliases with JavaScript Destructuring](#Aliases-with-JavaScript-Destructuring)|
20
+
|14 |[The Object.is() method determines whether two values are the same value](#The-Object.is()-method-determines-whether-two-values-are-the-same-value)|
21
+
|15 |[Freeze an object](#Freeze-an-object)|
22
+
|16 |[Printing Object keys and values](#Printing-Object-keys-and-values)|
23
+
|17 |[Capture the right click event](#Capture-the-right-click-event)|
24
+
|18 |[In HTML5, you can tell the browser when to run your JavaScript code](#In-HTML5,-you-can-tell-the-browser-when-to-run-your-JavaScript-code)|
|22 |[The second argument of JSON.stringify lets you cherry-pick 🍒 keys to serialize.](#The-second-argument-of-JSON.stringify-lets-you-cherry-pick-🍒-keys-to-serialize)|
29
+
|23 |[Fire an event listener only once.](#Fire-an-event-listener-only-once)|
30
+
|24 |[Vanilla JS toggle](#Vanilla-JS-toggle)|
31
+
|25 |[Check if a string is a valid JSON](#Check-if-a-string-is-a-valid-JSON)|
// an equality check against nullary values (e.g. null or undefined). Whenever the expression to the left of the ?? operator evaluates to either //undefined or null, the value defined to the right will be returned.
@@ -410,7 +418,8 @@ console.log(age);
410
418
// expected output: "0"
411
419
```
412
420
413
-
# Optional chaining
421
+
**[⬆ Back to Top](#table-of-contents)**
422
+
### Optional chaining
414
423
```javascript
415
424
416
425
constcar= {}
@@ -433,7 +442,8 @@ console.log(newCarColor)
433
442
//You can use this syntax today using @babel/plugin-proposal-optional-chaining
434
443
```
435
444
436
-
# globalThis
445
+
**[⬆ Back to Top](#table-of-contents)**
446
+
### globalThis
437
447
```javascript
438
448
Accessing the global property in JavaScript has always posed some difficulty. This is because
439
449
different platforms have different ways to access it.
@@ -451,7 +461,7 @@ console.log(globalThis) //get the global this depends on your environment
451
461
```
452
462
453
463
454
-
464
+
**[⬆ Back to Top](#table-of-contents)**
455
465
# The second argument of JSON.stringify lets you cherry-pick 🍒 keys to serialize.
0 commit comments