Skip to content

Commit 510bca1

Browse files
committed
Fix typo on Chapter 5, Section 5.
Section 5.1 is titled "5.1. Indicies" , should be "Indices". Thanks for the book :)!
1 parent 39ee9f7 commit 510bca1

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* [Comparators](conditional/comparators.md)
2020
* [Concatenate](conditional/concatenate.md)
2121
* [Arrays](arrays/README.md)
22-
* [Indicies](arrays/indicies.md)
22+
* [Indices](arrays/indices.md)
2323
* [Length](arrays/length.md)
2424
* [Loops](loops/README.md)
2525
* [For](loops/for.md)
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
# Indicies
1+
# Indices
22

3-
So you have your array of data elements, but what if you want to access a specific element? That is where indicies come in. An **index** refers to a spot in the array. Indicies logically progress one by one, but it should be noted that the first index in an array is 0, as it is in most languages. Brackets [] are used to signify you are referring to an index of an array.
3+
So you have your array of data elements, but what if you want to access a specific element? That is where indices come in. An **index** refers to a spot in the array. indices logically progress one by one, but it should be noted that the first index in an array is 0, as it is in most languages. Brackets [] are used to signify you are referring to an index of an array.
44

55
```javascript
66
// This is an array of strings
77
var fruits = ["apple", "banana", "pineapple", "strawberry"];
88

99
// We set the variable banana to the value of the second element of
10-
// the fruits array. Remember that indicies start at 0, so 1 is the
10+
// the fruits array. Remember that indices start at 0, so 1 is the
1111
// second element. Result: banana = "banana"
1212
var banana = fruits[1];
1313
```
1414
---
1515

16-
Define the variables using the indices of the array
16+
Define the variables using the indices of the array
1717

1818
```js
1919
var cars = ["Mazda", "Honda", "Chevy", "Ford"]
20-
var honda =
21-
var ford =
20+
var honda =
21+
var ford =
2222
var chevy =
2323
var mazda =
2424
```

0 commit comments

Comments
 (0)