here is my assignment.

Code JavaScript:
Below you will find an array of names to use in this problem.
 
input[0] should contain a number, which we will call n.
input[1] should contain a number, which we will call i.
input[2] should contain a letter, which we will call l.
You are to create a program which looks at all the names from 0 through n;
if the letter l, upper or lower case, appears in the name at position i, 
then the name should be printed along with a message like:
xxxxxx contains the letter l at position i
where xxxxxx is the name, l is the letter from input[2] and i is the
position from input[1].
If the input n is greater than the number of names, 
an error message should be printed and no names should be examined.
If a particular name does not have i characters, 
it should not cause an error message, but that name should be ignored. That is, if i is 6, Iowa should be ignored.

I figure i have to create a loop to search through the array of:

Code JavaScript:
var names = new Array();
names[0] = "Alabama";
names[1] = "ALASKA";
names[2] = "Arizona";
names[3] = "Arkansas";
names[4] = "California";
names[5] = "Colorado";
names[6] = "Connecticut";
names[7] = "Delaware";
names[8] = "Florida";
names[9] = "Georgia";
names[10] = "Hawaii";

But i am not sure how to do this. Im researching loops now. Any links would be helpful. Im obviously a nub.
Hate is not appreciated, just some love for the newbie. ;-)