Removed swap
This commit is contained in:
12
README.md
12
README.md
@ -121,7 +121,6 @@
|
|||||||
* [Random integer in range](#random-integer-in-range)
|
* [Random integer in range](#random-integer-in-range)
|
||||||
* [Random number in range](#random-number-in-range)
|
* [Random number in range](#random-number-in-range)
|
||||||
* [RGB to hexadecimal](#rgb-to-hexadecimal)
|
* [RGB to hexadecimal](#rgb-to-hexadecimal)
|
||||||
* [Swap values of two variables](#swap-values-of-two-variables)
|
|
||||||
* [URL parameters](#url-parameters)
|
* [URL parameters](#url-parameters)
|
||||||
* [UUID generator](#uuid-generator)
|
* [UUID generator](#uuid-generator)
|
||||||
* [Validate email](#validate-email)
|
* [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)
|
[⬆ 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
|
### 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.
|
Use `match()` with an appropriate regular expression to get all key-value pairs, `Array.reduce()` to map and combine them into a single object.
|
||||||
|
|||||||
@ -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]
|
|
||||||
```
|
|
||||||
@ -84,7 +84,6 @@ sort-characters-in-string-(alphabetical):string
|
|||||||
speech-synthesis-(experimental):media
|
speech-synthesis-(experimental):media
|
||||||
standard-deviation:math
|
standard-deviation:math
|
||||||
sum-of-array-of-numbers:array
|
sum-of-array-of-numbers:array
|
||||||
swap-values-of-two-variables:utility
|
|
||||||
tail-of-list:array
|
tail-of-list:array
|
||||||
take-every-nth-element:array
|
take-every-nth-element:array
|
||||||
take-right:array
|
take-right:array
|
||||||
|
|||||||
Reference in New Issue
Block a user