Remove array concat

This commit is contained in:
Angelos Chalaris
2017-12-16 17:38:06 +02:00
parent 3804a49830
commit a7b52781b9
3 changed files with 0 additions and 21 deletions

View File

@ -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`.

View File

@ -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]]
```

View File

@ -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