USE MULTIPLE PROMPTS

You can use more than one prompt if you want to collect more than one response. For example, you might ask for the user's first name in the first prompt, and the last name in the second prompt, as in the following code:

var fname = prompt 
("Please enter your first name: ","");
var lname = prompt 
("Please enter your last name: ", "");
alert ("Hello, " + fname + " " + lname);

Notice that there is a space (" ") inserted between the first name and last name variables so that the first and last name aren't pushed together in the alert box display.