You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,7 @@ Write your JavaScript in the provided `src/functions-and-arrays.js` file.
86
86
87
87
Define a function `maxOfTwoNumbers` that takes two numbers as arguments and returns the largest.
88
88
89
-
## Iteration #2: Finding Longest Word
89
+
## Iteration #2: Find longest word
90
90
91
91
Declare a function named `findLongestWord` that takes as an argument an array of words and returns the longest one. If there are 2 with the same length, it should return the first occurrence.
92
92
@@ -96,7 +96,7 @@ Declare a function named `findLongestWord` that takes as an argument an array of
Calculating an average is an extremely common task. Let's practice it a bit.
116
116
@@ -119,7 +119,7 @@ Calculating an average is an extremely common task. Let's practice it a bit.
119
119
1. Find the sum as we did in the first exercise
120
120
2. Take the sum from step 1, and divide it by the number of elements in the list.
121
121
122
-
### Level 1: Array of Numbers
122
+
### Level 1: Array of numbers
123
123
124
124
Declare a function named `averageNumbers` that expects an array of numbers and returns the average of the numbers:
125
125
@@ -129,7 +129,7 @@ Declare a function named `averageNumbers` that expects an array of numbers and r
129
129
constnumbers= [2, 6, 9, 10, 7, 4, 1, 9];
130
130
```
131
131
132
-
### Level 2: Array of Strings
132
+
### Level 2: Array of strings
133
133
134
134
Declare a function named `averageWordLength` that receives as a single argument an array of words and returns the average length of the words:
135
135
@@ -150,7 +150,7 @@ const words = [
150
150
];
151
151
```
152
152
153
-
## Iteration #5: Unique Arrays
153
+
## Iteration #5: Unique arrays
154
154
155
155
Take the following array, remove the duplicates, and return a new array. You're more than likely going to want to check out the [`indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf) Array method.
156
156
@@ -174,7 +174,7 @@ const words = [
174
174
];
175
175
```
176
176
177
-
## Iteration #6: Finding Elements
177
+
## Iteration #6: Find elements
178
178
179
179
Let's create a simple array search.
180
180
@@ -195,7 +195,7 @@ const words = [
195
195
];
196
196
```
197
197
198
-
## Iteration #7: Counting Repetition
198
+
## Iteration #7: Count repetition
199
199
200
200
Declare a function named `howManyTimes` that will take in an array of words as the first argument, and a word to search for as the second argument. The function will return the number of times that word appears in the array.
0 commit comments