From the sounds of it, the following meets your requirements:
var a, d, t;
while ( ! a ) a = prompt( "Which Artist?" );
while ( ! d ) d = prompt( "How many DVDs?" );
while ( ! t ) t = prompt( "How many tapes?" );
alert( "You want " + t + " Tapes, and " + d + " DVDs, of " + a + "." );
Let's break it down you so have an understanding of what's going on:
var a, d, t;
On the first line, I'm declaring the various variables I plan on using in the code below. This is a common practice, and would be a good habit to develop if you want to maintain clean and manageable code.
while ( ! a )
The while loop is a loop that will run over and over, until a condition is met. In this example, we're telling the loop to run as long as we don't have a value for a. What comes next is our attempt to collect a value of a from the user:
while ( ! a ) a = prompt( "Which Artist?" );
Each time the while loop runs, we will prompt the user to answer the question. We take their answer, and assign it to a. If they entered nothing, our while loop runs again, prompting them again. You can probably make sense of the next two while loops at this point.
Lastly is our alert, which gathers up the various values and shows them to the user:
alert( 'Artist ' + a );
This also presents an example of string concatenation, or joining together of two strings. We have a value stored inside a, and a value written explicitly as text. We use the + operator to join both of these together, like glue tying two ends of a rope together. As we add more strings, and more variables, we use the + operator more and more:
alert( "You want " + t + " Tapes, and " + d + " DVDs, of " + a + "." );
When this code is ran, t, d, and a will all be replaced with the actual values inserted by the end-user.
Note, this is a very basic implementation of what your homework requires. A real solution would test the type of input to make sure it's of the expected format. For instance, when asking how many DVDs the user wants, you may want to restrict 'acceptable' answers to integers only.
Best of luck!