Skip to content

Commit

Permalink
Add alias statement to sig snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
sae220 committed Sep 30, 2024
1 parent 27f6c1e commit faa2ede
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion common-docs/reference/arrays/pop.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
Remove and return the last element from an array.

```sig
["hello"].pop()
["hello"].pop();
["hello"]._popStatement();
```

The last element in the array is removed, so the array becomes smaller by one element.
Expand Down
3 changes: 2 additions & 1 deletion common-docs/reference/arrays/remove-at.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
Remove and return an element from an array at some position.

```sig
[""].removeAt(0)
[""].removeAt(0);
[""]._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 Down
3 changes: 2 additions & 1 deletion common-docs/reference/arrays/shift.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
Remove and return the first element from an array.

```sig
[""].shift()
[""].shift();
[""]._shiftStatement();
```

The first element in the array is removed, so the array becomes smaller by one element.
Expand Down
3 changes: 2 additions & 1 deletion common-docs/reference/arrays/unshift.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
Add an element to the front of an array.

```sig
[""].unshift("hello")
[""].unshift("hello");
[""]._unshiftStatement("hello");
```

You might have an array with 3 numbers, like 1, 2, and 3. If you want to add another number to the front,
Expand Down

0 comments on commit faa2ede

Please sign in to comment.