I'm new on the website

My problem is that I have my first 'if' statement working fine but the second is not responding properly. Instead of writing: no such book, it wrote book reserved+no such book
can someone please help me
Here is my coding:
var bookArray = ['Framley Parsonage 1st Ed', 'Lady, Don\'t Fall Backwards', 'How to Win Friends 2nd Ed ', 'The Death of Harry Potter', 'The Kama Sutra (unexpurgated)', 'Little Noddy Goes to the Moon'];
var IndexBookArray = [ 0, 1, 2, 3, 4, 5 ]
var IndexBookArray;
IndexBookArray = window.prompt('What would you like to do?' + '1. Reserve a book' + '2. Borrow a book' + ' .Enter 1 or 2 to select','')
if (IndexBookArray == 1)
IndexBookArray = window.prompt('Enter the index number of the book to be reserved','')
if((IndexBookArray == 0) || (IndexBookArray == 2) ||(IndexBookArray > 3) || (IndexBookArray < 6))
{
document.write('Book reserved')
}
if (IndexBookArray > 5)
{
document.write('--->' + 'No such book!')
}