Removed swap

This commit is contained in:
Angelos Chalaris
2017-12-16 14:22:08 +02:00
parent e0ae406574
commit 46ca8b33b7
3 changed files with 0 additions and 21 deletions

View File

@ -121,7 +121,6 @@
* [Random integer in range](#random-integer-in-range)
* [Random number in range](#random-number-in-range)
* [RGB to hexadecimal](#rgb-to-hexadecimal)
* [Swap values of two variables](#swap-values-of-two-variables)
* [URL parameters](#url-parameters)
* [UUID generator](#uuid-generator)
* [Validate email](#validate-email)
@ -1367,17 +1366,6 @@ const rgbToHex = (r, g, b) => ((r << 16) + (g << 8) + b).toString(16).padStart(6
[⬆ back to top](#table-of-contents)
### Swap values of two variables
Use array destructuring to swap values between two variables.
```js
[varA, varB] = [varB, varA];
// [x, y] = [y, x]
```
[⬆ back to top](#table-of-contents)
### URL parameters
Use `match()` with an appropriate regular expression to get all key-value pairs, `Array.reduce()` to map and combine them into a single object.

View File

@ -1,8 +0,0 @@
### Swap values of two variables
Use array destructuring to swap values between two variables.
```js
[varA, varB] = [varB, varA];
// [x, y] = [y, x]
```

View File

@ -84,7 +84,6 @@ sort-characters-in-string-(alphabetical):string
speech-synthesis-(experimental):media
standard-deviation:math
sum-of-array-of-numbers:array
swap-values-of-two-variables:utility
tail-of-list:array
take-every-nth-element:array
take-right:array