Skip to content

Commit 41544a7

Browse files
committed
iteration ironhack-labs#1 done
1 parent 03c9f67 commit 41544a7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

starter-code/src/functions-and-arrays.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
// Iteration #1: Find the maximum
22

3+
function maxOfTwoNumbers(numberOne, numberTwo) {
4+
if (numberOne > numberTwo) {
5+
return numberOne;
6+
} else {
7+
return numberTwo;
8+
}
9+
}
10+
311
// Iteration #2: Find longest word
412
const words = ['mystery', 'brother', 'aviator', 'crocodile', 'pearl', 'orchard', 'crackpot'];
513

14+
function findLongestWord(arrayOfWords) {
15+
16+
}
17+
618
// Iteration #3: Calculate the sum
719

820
const numbers = [6, 12, 1, 18, 13, 16, 2, 1, 8, 10];

0 commit comments

Comments
 (0)