Skip to content

Commit fdcaff6

Browse files
fix(curriculum): fixed typo in JavaScript arrays review and quiz (freeCodeCamp#61770)
1 parent ec815cd commit fdcaff6

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

curriculum/challenges/english/25-front-end-development/quiz-javascript-arrays/66edcccbba6dacdb65a59067.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ console.log(numbers[10]);
4444

4545
#### --text--
4646

47-
Which of the following is the correct way access the string `"Jessica"` from the `developers` array?
47+
Which of the following is the correct way to access the string `"Jessica"` from the `developers` array?
4848

4949
#### --distractors--
5050

curriculum/challenges/english/25-front-end-development/review-javascript-arrays/6723c66f623701a3cdf72130.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ developers[1] // "Naomi"
2525
developers[10] // undefined
2626
```
2727

28-
- **`length` Property**: This property is used to return the number of items in a array.
28+
- **`length` Property**: This property is used to return the number of items in an array.
2929

3030
```js
3131
const developers = ["Jessica", "Naomi", "Tom"];
@@ -123,7 +123,7 @@ desserts.unshift("ice cream");
123123
console.log(desserts); // ["ice cream", "cake", "cookies", "pie"];
124124
```
125125

126-
- **`indexOf()` Method**: This method is useful for finding the first index of a specific element within an array. If the element cannot be found, then it will return -1.
126+
- **`indexOf()` Method**: This method is useful for finding the first index of a specific element within an array. If the element cannot be found, then it will return `-1`.
127127

128128
```js
129129
const fruits = ["apple", "banana", "orange", "banana"];
@@ -160,7 +160,7 @@ const newList = programmingLanguages.concat("Perl");
160160
console.log(newList); // ["JavaScript", "Python", "C++", "Perl"]
161161
```
162162

163-
- **`slice()` Method**: This method returns a shallow copy of a portion of the array at a specified index or the entire array. A shallow copy will copy the reference to the array instead of duplicating it.
163+
- **`slice()` Method**: This method returns a shallow copy of a portion of the array, starting from a specified index or the entire array. A shallow copy will copy the reference to the array instead of duplicating it.
164164

165165
```js
166166
const programmingLanguages = ["JavaScript", "Python", "C++"];

curriculum/challenges/english/25-front-end-development/review-javascript/6723d3cfdd0717d3f1bf27e3.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ desserts.unshift("ice cream");
786786
console.log(desserts); // ["ice cream", "cake", "cookies", "pie"];
787787
```
788788

789-
- **`indexOf()` Method**: This method is useful for finding the first index of a specific element within an array. If the element cannot be found, then it will return -1.
789+
- **`indexOf()` Method**: This method is useful for finding the first index of a specific element within an array. If the element cannot be found, then it will return `-1`.
790790

791791
```js
792792
const fruits = ["apple", "banana", "orange", "banana"];
@@ -823,7 +823,7 @@ const newList = programmingLanguages.concat("Perl");
823823
console.log(newList); // ["JavaScript", "Python", "C++", "Perl"]
824824
```
825825

826-
- **`slice()` Method**: This method returns a shallow copy of a portion of the array at a specified index or the entire array. A shallow copy will copy the reference to the array instead of duplicating it.
826+
- **`slice()` Method**: This method returns a shallow copy of a portion of the array, starting from a specified index or the entire array. A shallow copy will copy the reference to the array instead of duplicating it.
827827

828828
```js
829829
const programmingLanguages = ["JavaScript", "Python", "C++"];

0 commit comments

Comments
 (0)