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
|9 |[Private Class Variables](#private-class-variables)|
93
93
||**ES2020 Or ES11**|
94
94
|1 |[BigInt](#bigint)|
@@ -98,12 +98,12 @@ Each proposal for an ECMAScript feature goes through the following maturity stag
98
98
|5 |[Promise allSettled](#promiseallsettled)|
99
99
|6 |[String matchAll](#string-matchall)|
100
100
|7 |[globalThis](#globalthis)|
101
-
|8 |[import.meta](#import.meta)|
102
-
|9 |[for..in order](#for..in-order)|
101
+
|8 |[import.meta](#importmeta)|
102
+
|9 |[for..in order](#forin-order)|
103
103
||**ES2021 Or ES12**|
104
-
|1 |[replaceAll](#replace-all)|
104
+
|1 |[replaceAll](#replaceall)|
105
105
|2 |[promise.any](#promiseany)|
106
-
|3 |[WeakRef](#weak-ref)|
106
+
|3 |[WeakRef](#weakref)|
107
107
|4 |[Numeric Separators](#numeric-separators)|
108
108
|5 |[Logical Operators](#logical-operators)|
109
109
@@ -2119,8 +2119,10 @@ Most of these features already supported by some browsers and try out with babel
2119
2119
2120
2120
5. ### Logical Operators
2121
2121
Logical assignment operators combines the logical operations(&&, || or ??) with assignment. They are quite useful for assigning default values to variables.
2122
+
2122
2123
**&&=:**
2123
-
The &&= operator performs the assignment only when the left operand is truthy.
2124
+
2125
+
The `&&=` operator performs the assignment only when the left operand is truthy.
2124
2126
```javascript
2125
2127
let x =10;
2126
2128
let y =20;
@@ -2137,7 +2139,9 @@ Most of these features already supported by some browsers and try out with babel
2137
2139
x = y;
2138
2140
}
2139
2141
```
2142
+
2140
2143
**||=:**
2144
+
2141
2145
The ||= operator performs the assignment only when the left operand is falsy.
2142
2146
```javascript
2143
2147
let x =0;
@@ -2155,7 +2159,9 @@ Most of these features already supported by some browsers and try out with babel
2155
2159
x = y;
2156
2160
}
2157
2161
```
2162
+
2158
2163
**??=:**
2164
+
2159
2165
The ??= operator performs the assignment only when the left operand is null or undefined.
2160
2166
```javascript
2161
2167
let x;
@@ -2164,12 +2170,14 @@ Most of these features already supported by some browsers and try out with babel
2164
2170
console.log(x); // 1
2165
2171
```
2166
2172
2167
-
The above logical assignment operation can be expanded to:
2173
+
The above logical assignment operation can be expanded to:
0 commit comments