Skip to content

Commit 231cef8

Browse files
namendjocaupolicandiazSSwiniarski
authored
Fix typo in .toSpliced() method (#3001)
* Fix typo in a comment * review edits --------- Co-authored-by: vide-onirique <[email protected]> Co-authored-by: Caupolican Diaz <[email protected]> Co-authored-by: SSwiniarski <[email protected]>
1 parent b43fde5 commit 231cef8

File tree

1 file changed

+5
-5
lines changed
  • content/javascript/concepts/arrays/terms/toSpliced

1 file changed

+5
-5
lines changed

content/javascript/concepts/arrays/terms/toSpliced/toSpliced.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ CatalogContent:
1111
- 'paths/front-end-engineer-career-path'
1212
---
1313

14-
**`.toSpliced()`** is a method that modifies multiple array elements. It has a start point (the first element to be modified) and an endpoint (the last element to be modified). `.toSpliced()` can make the following changes to an array:
14+
**`.toSpliced()`** is a method that modifies multiple array elements. It has a starting point (the first element to be modified) and an end point (the last element to be modified). `.toSpliced()` can make the following changes to an array:
1515

1616
- Extract element(s)
1717
- Replace element(s)
@@ -33,7 +33,7 @@ myArray.toSpliced(startIndex, count, elementN)
3333

3434
## Examples
3535

36-
### Extract Array Elements With `.toSpliced`
36+
### Extracting Array Elements
3737

3838
```js
3939
const colors = ['red', 'yellow', 'blue', 'orange', 'green', 'purple'];
@@ -49,12 +49,12 @@ console.log(colors);
4949
// Output: 'red', 'yellow', 'blue', 'orange', 'green', 'purple'
5050
```
5151

52-
### Replace Array Elements Using `.toSpliced()`
52+
### Replacing Array Elements
5353

5454
```js
5555
const colors = ['red', 'yellow', 'blue', 'orange', 'green', 'purple'];
5656

57-
// Replacing red, green, and yellow. Start at index 0, and replace three items.
57+
// Replacing red, yellow, and blue. Start at index 0, and replace three items.
5858
const tertiaryColors = colors.toSpliced(
5959
0,
6060
3,
@@ -70,7 +70,7 @@ console.log(colors);
7070
// Output: 'red', 'yellow', 'blue', 'orange', 'green', 'purple'
7171
```
7272

73-
### Insert New Items Into an Array Using `.toSpliced`
73+
### Inserting New Items Into an Array
7474

7575
```js
7676
const colors = ['red', 'yellow', 'blue', 'orange', 'green', 'purple'];

0 commit comments

Comments
 (0)