Hello people,
so I am a beginner to javascript and am in web development class at the moment and our teacher wants us to create a javascript guessing game. The idea is we have 6 names that we have to put into an array and after the user enters their name into a prompt they are to guess the names of the sports. I got a start going but I am having major problems when the coding actually gets tough (probably easy for most but not me). Ive posted the instructions and am having a hell of a time at part a of the instructions. I was wondering if anyone could help me out with at least how to set up to code and what to use exactly, ive searched all around and could not find a good resource that has the information I need. So please if anyone would mind helping me out with this it would be hugely appreciated. Also here is the code I have so far.

<!DOCTYPE html>
	<title>Assignment 13</title>
		var sports=new Array("Football", "Basketball", "Rollerblading", "Hiking", "Biking", "Swimming");

		var person=prompt("Please enter your name","Enter Name Here");

		if (person!=null && person!="");


  		//message after name will go into here x="Hello " + person + "! How are you today?";


		var array=prompt("Guess the name of one of the sports in the array","Enter Sport Here");

		if (array!=null && array!="");




Instructions for the assignme

Populate an array with these sports, typed as they are here: 

Football, Basketball, Rollerblading, Hiking, Biking, Swimming

2. Prompt the user for their name. This will be used in the messages later.

3. Prompt the user to guess a sport to see if they can guess one that is in the array. Do 
not show them what is in the array. This will be repeated 3 times. Read on for the 
processing of each guess.

a. For each guess, compare what the user enters to the values in the array. 
(Remember: a lower case letter is not the same as an uppercase letter and you 
cannot require the user to enter their guess in a specific case) If what the user 
entered is not in the array then give them a message to “Guess Again”. If they 
guessed one of the sports correctly, give them a message like “You are good, try 
it again!”

b. For each guess, if the user guesses the right sport then give them 5 points and 
go on to the next prompt so they can try to guess the next sport. If they don’t 
guess it then, take away 5 points and go on to the next prompt.

c. If the user hits the cancel key on the prompt window, before the 3 times, then 
end the game and give them an alert that says “Playersname, you are chicken!”, 
where the Playersname is what they entered in #2 above.

4. After 3 times playing, if the players score is 15 then tell them “Playername, you are a
mind reader!”

5. After 3 times playing, if the players score is 0-15 then tell them “Playername, you are 
not bad”

6. After 3 times playing, if the players score is less than zero then tell them “Playername, 
you do not demonstrate ESP tendencies at this time.”