diff --git a/Week2/Assignment1.js b/Week2/Assignment1.js index 46f58b6..26fbf5d 100644 --- a/Week2/Assignment1.js +++ b/Week2/Assignment1.js @@ -1,6 +1,6 @@ function max(numbers) { let maxNumber = numbers[0]; - for (let i = 0; i < numbers.length; i++) { + for (let i = 1; i < numbers.length; i++) { if (numbers[i] > maxNumber) { maxNumber = numbers[i]; }