Remove array concat
This commit is contained in:
12
README.md
12
README.md
@ -10,7 +10,6 @@
|
|||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
### Array
|
### Array
|
||||||
* [Array concatenation](#array-concatenation)
|
|
||||||
* [Array difference](#array-difference)
|
* [Array difference](#array-difference)
|
||||||
* [Array intersection](#array-intersection)
|
* [Array intersection](#array-intersection)
|
||||||
* [Array remove](#array-remove)
|
* [Array remove](#array-remove)
|
||||||
@ -133,17 +132,6 @@
|
|||||||
|
|
||||||
## Array
|
## Array
|
||||||
|
|
||||||
### Array concatenation
|
|
||||||
|
|
||||||
Use Array spread operators (`...`) to concatenate an array with any additional arrays and/or values, specified in `args`.
|
|
||||||
|
|
||||||
```js
|
|
||||||
const ArrayConcat = (arr, ...args) => [...arr,...args];
|
|
||||||
// ArrayConcat([1], [1, 2, 3, [4]]) -> [1, 1, 2, 3, [4]]
|
|
||||||
```
|
|
||||||
|
|
||||||
[⬆ back to top](#table-of-contents)
|
|
||||||
|
|
||||||
### Array difference
|
### Array difference
|
||||||
|
|
||||||
Create a `Set` from `b`, then use `Array.filter()` on `a` to only keep values not contained in `b`.
|
Create a `Set` from `b`, then use `Array.filter()` on `a` to only keep values not contained in `b`.
|
||||||
|
|||||||
@ -1,8 +0,0 @@
|
|||||||
### Array concatenation
|
|
||||||
|
|
||||||
Use Array spread operators (`...`) to concatenate an array with any additional arrays and/or values, specified in `args`.
|
|
||||||
|
|
||||||
```js
|
|
||||||
const ArrayConcat = (arr, ...args) => [...arr,...args];
|
|
||||||
// ArrayConcat([1], [1, 2, 3, [4]]) -> [1, 1, 2, 3, [4]]
|
|
||||||
```
|
|
||||||
@ -1,6 +1,5 @@
|
|||||||
3-digit-hexcode-to-6-digit-hexcode:utility
|
3-digit-hexcode-to-6-digit-hexcode:utility
|
||||||
anagrams-of-string-(with-duplicates):string
|
anagrams-of-string-(with-duplicates):string
|
||||||
array-concatenation:array
|
|
||||||
array-difference:array
|
array-difference:array
|
||||||
array-intersection:array
|
array-intersection:array
|
||||||
array-remove:array
|
array-remove:array
|
||||||
|
|||||||
Reference in New Issue
Block a user