Skip to content

Commit 00f1129

Browse files
authored
Update README.md
1 parent c9d4428 commit 00f1129

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,3 +172,18 @@ let y = 10;
172172

173173
console.log(x, y) // 10, 5
174174
```
175+
176+
## Explanation
177+
178+
> Destructuring is very useful, this example is the same as :
179+
> ```javascript
180+
> let x = 5;
181+
> let y = 10;
182+
> let z;
183+
>
184+
> z = x;
185+
> x = y;
186+
> y = z;
187+
>
188+
> console.log(x, y) // 10, 5
189+
> ```

0 commit comments

Comments
 (0)