Skip to content

Commit af7210e

Browse files
committed
add solution ironhack-labs#4.2
1 parent 022d791 commit af7210e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/functions-and-arrays.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,15 @@ function averageNumbers(input) {
6565
return null;
6666
}
6767
let sumElements = sum(input);
68-
return sumElements/input.length;
68+
return sumElements / input.length;
6969
}
7070

7171
// Level 2: Array of strings
7272
const wordsArr = ['seat', 'correspond', 'linen', 'motif', 'hole', 'smell', 'smart', 'chaos', 'fuel', 'palace'];
7373

74-
function averageWordLength() {}
74+
function averageWordLength(input) {
75+
return averageNumbers(input);
76+
}
7577

7678
// Bonus - Iteration #4.1
7779
function avg() {}

0 commit comments

Comments
 (0)