Skip to content

Commit 554eca2

Browse files
committed
Fix formatting issues
1 parent b9bb855 commit 554eca2

File tree

1 file changed

+23
-15
lines changed

1 file changed

+23
-15
lines changed

README.md

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Each proposal for an ECMAScript feature goes through the following maturity stag
5050
|7 | [Default parameters](#default-parameters) |
5151
|8 | [Rest parameter](#rest-parameter) |
5252
|9 | [Spread Operator](#spread-operator) |
53-
|10 | [Iterators & For..of](#iterators-&-for..of) |
53+
|10 | [Iterators & For..of](#iterators-&-forof) |
5454
|11 | [Generators](#generators) |
5555
|12 | [Modules](#modules) |
5656
|13 | [Set](#set) |
@@ -88,7 +88,7 @@ Each proposal for an ECMAScript feature goes through the following maturity stag
8888
|5 | [Optional Catch Binding](#optional-catch-binding)|
8989
|6 | [JSON Improvements](#json-improvements)|
9090
|7 | [Array Stable Sort](#array-stable-sort)|
91-
|8 | [Function.toString()](#function.tostring())|
91+
|8 | [Function.toString()](#functiontostring())|
9292
|9 | [Private Class Variables](#private-class-variables)|
9393
| | **ES2020 Or ES11**|
9494
|1 | [BigInt](#bigint) |
@@ -98,12 +98,12 @@ Each proposal for an ECMAScript feature goes through the following maturity stag
9898
|5 | [Promise allSettled](#promiseallsettled)|
9999
|6 | [String matchAll](#string-matchall)|
100100
|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)|
103103
| | **ES2021 Or ES12**|
104-
|1 | [replaceAll](#replace-all) |
104+
|1 | [replaceAll](#replaceall) |
105105
|2 | [promise.any](#promiseany) |
106-
|3 | [WeakRef](#weak-ref)|
106+
|3 | [WeakRef](#weakref)|
107107
|4 | [Numeric Separators](#numeric-separators)|
108108
|5 | [Logical Operators](#logical-operators)|
109109

@@ -2119,8 +2119,10 @@ Most of these features already supported by some browsers and try out with babel
21192119
21202120
5. ### Logical Operators
21212121
Logical assignment operators combines the logical operations(&&, || or ??) with assignment. They are quite useful for assigning default values to variables.
2122+
21222123
**&&=:**
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.
21242126
```javascript
21252127
let x = 10;
21262128
let y = 20;
@@ -2137,7 +2139,9 @@ Most of these features already supported by some browsers and try out with babel
21372139
x = y;
21382140
}
21392141
```
2142+
21402143
**||=:**
2144+
21412145
The ||= operator performs the assignment only when the left operand is falsy.
21422146
```javascript
21432147
let x = 0;
@@ -2155,7 +2159,9 @@ Most of these features already supported by some browsers and try out with babel
21552159
x = y;
21562160
}
21572161
```
2162+
21582163
**??=:**
2164+
21592165
The ??= operator performs the assignment only when the left operand is null or undefined.
21602166
```javascript
21612167
let x;
@@ -2164,12 +2170,14 @@ Most of these features already supported by some browsers and try out with babel
21642170
console.log(x); // 1
21652171
```
21662172
2167-
The above logical assignment operation can be expanded to:
2173+
The above logical assignment operation can be expanded to:
21682174
2169-
```javascript
2170-
x = x ?? (x = y);
2171-
(OR)
2172-
if (!x) {
2173-
x = y;
2174-
}
2175-
```
2175+
```javascript
2176+
x = x ?? (x = y);
2177+
(OR)
2178+
if (!x) {
2179+
x = y;
2180+
}
2181+
```
2182+
2183+
**[⬆ Back to Top](#table-of-contents)**

0 commit comments

Comments
 (0)