Skip to content

Commit

Permalink
add statement 'alias' information to 'remove-at' page
Browse files Browse the repository at this point in the history
  • Loading branch information
ganicke authored Oct 16, 2024
1 parent 45f33a3 commit 1a3549c
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions common-docs/reference/arrays/remove-at.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
Remove and return an element from an array at some position.

```sig
[""].removeAt(0);
[""]._removeAtStatement(0);
[""].removeAt(0)
```

Remove an element from an array at some position but don't return it.

```sig
[""]._removeAtStatement(0)
```

The size of the array shrinks by one. The element is removed from the array at the position you want. All the other elements after it are moved (shifted) to down to the next lower position. So, an array that has the numbers
Expand All @@ -23,6 +28,18 @@ let item = myNumbers.removeAt(2)

* the element in the array from the position you chose.

### ~reminder

#### **remove At** statement

The ``||arrays:remove at||`` **statement** only removes an element from the array. It doesn't return it.

```block
["a", "b", "c"]._removeAtStatement(0)
```

### ~

## Example

Remove the most dangerous level of radiation from the list.
Expand All @@ -35,4 +52,4 @@ let unzapped = radLevels.removeAt(level)

## See also

[insert at](/reference/arrays/insert-at)
[insert at](/reference/arrays/insert-at)

0 comments on commit 1a3549c

Please sign in to comment.