while loop question
I'm working on a for loop and was hoping for some help. My husband and I collect records, 45's that is. I'm trying to develop an interface that would allow input and then return a dollar value.
For example, I would like a prompt to ask for the number of records, then loop through alert boxes asking for dollar value for each record, then return a total dollar value.
I'm missing something, and I'm not sure what, I've been through it many times and somehow keep getting errors, or no output. Could someone please look at this and let me know what I am missing?
var recnumber = parseInt(prompt("How many records were purchased?","2")); //prompt for number of records (45s)
var rectotal = parseFloat(0); // declare and initialize running total
var counter = 0; //counter
while (counter <= recnumber)
var indrec = parseFloat(prompt("What is the dollar value of the record?","12.00"); //prompt for dollar value of a single record
rectotal = (rectotal + indrec); //add indvidual record value to running total