lots of mistakes.
And you really shouldn't be using prompt() or document.write() at all. Those are both considered obsolete.
Plus, because your code uses document.write, there's no good way to allow the user to enter a number more than once.
Anyway, for starters, kill you current method of creating the array. K.I.S.S.
Code:
var presidents = [ "N/A", "Washington", "Adams", "Jefferson", ... ];
var which = ...get a number from user ...
var choice = presidents[which};
...
Try to do it using a <form> and an <input> instead of prompt(), if you can.
And then put the
choice in place using
innerHTML or put it into another <form> field using
.value.
Oh, and there is no need for any FOR loop in your code, even if you don't use what I suggested. Dunno why you ever thought you needed one.