Small improvement
Rearranged so that `Immutable` is above `Mutative` in both examples.
This commit is contained in:
parent
cb4e03077f
commit
9827f09f5c
12
js-array.md
12
js-array.md
|
@ -35,6 +35,12 @@ re = list.splice(1,2) // re = [b,c] list == [a,d,e]
|
|||
|
||||
### Adding items
|
||||
|
||||
#### Immutable
|
||||
|
||||
```bash
|
||||
list.concat([X,Y]) // → [_,_,_,_,_,X,Y]
|
||||
```
|
||||
|
||||
#### Mutative
|
||||
|
||||
```bash
|
||||
|
@ -43,12 +49,6 @@ list.unshift(X) // list == [X,_,_,_,_,_]
|
|||
list.splice(2, 0, X) // list == [_,_,X,_,_,_]
|
||||
```
|
||||
|
||||
#### Immutable
|
||||
|
||||
```bash
|
||||
list.concat([X,Y]) // → [_,_,_,_,_,X,Y]
|
||||
```
|
||||
|
||||
### Inserting
|
||||
|
||||
```bash
|
||||
|
|
Loading…
Reference in New Issue