So, the code I am using is below. It all works, except for the last part where it is supposed to go through and find the highest number out of a set of five. At the moment, it just choses Monday and the amount of books borrowed on that day. It is not going through the other amounts and comparing them. So, can anyone help and show me what I have missed out? var booksArray = new Array (5); var dayNamesArray = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday']; var maxBooksIndex; document.write('Array program to read in a known number of books borrowed over five days'); for (var day = 0; day < booksArray.length; day = day + 1) { booksArray[day] = window.prompt('Enter number of books borrowed on ' + dayNamesArray[day],'') }; document.write('
' + '
'); document.write('Confirmation of data input' + '
' + '
'); for (var day = 0; day < booksArray.length; day = day + 1) { document.write(dayNamesArray[day] + ': ' + booksArray[day] + '
') }; maxBooksIndex = 0; for (var day = 1; day < booksArray.length; day = day + 1) { if (booksArray[day] > booksArray[maxBooksIndex]) { maxBooksIndex = day; } }; document.write('Maximum number of books was ' + booksArray[maxBooksIndex] + ' and this was on ' + dayNamesArray[maxBooksIndex])
More...