Skip to content

Commit 5d3d7c2

Browse files
committed
Iteration ironhack-labs#1: Find the maximum - DONE
1 parent 93c90e1 commit 5d3d7c2

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/functions-and-arrays.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
// Iteration #1: Find the maximum
2-
function maxOfTwoNumbers() {}
2+
function maxOfTwoNumbers(number1, number2) {
3+
if (number1 > number2){
4+
return number1
5+
} else {
6+
return number2
7+
}
8+
}
39

410

511

tests/functions-and-arrays.spec.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ const shuffle = (currentArray) => {
2424
array[randomIndex] = temp;
2525
}
2626
return array;
27+
28+
// esto es una prueba
29+
function maxOfTwoNumbers(){
30+
return maxOfTwoNumbers
31+
}
32+
2733
};
2834

2935
describe('Find the maximum', () => {

0 commit comments

Comments
 (0)