Skip to content

Commit 5a24fab

Browse files
committed
Iteration ironhack-labs#1: Find the maximum
1 parent 306a8ff commit 5a24fab

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
// Iteration #1: Find the maximum
2+
function maxOfTwoNumbers(num1, num2) {
3+
let result = num1 >= num2 ? num1 : num2;
4+
return result;
5+
}
26

37
// Iteration #2: Find longest word
48
const words = ['mystery', 'brother', 'aviator', 'crocodile', 'pearl', 'orchard', 'crackpot'];

0 commit comments

Comments
 (0)