diff --git a/js-array.md b/js-array.md index 1af3d7f08..2eab3e081 100644 --- a/js-array.md +++ b/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