re wrote to look like such and nothing happens @mwilki7
<script type ="text/javascript">
function roll(numOfRolls)
{
// Initalize function variables and a history array
var i=0;
while (i < numOfRolls)
{
r=RandomInt(1, 6);
rollHist[r-1]++; // rollHist[r] value is incremented
totals+=r i++; // add the value or r to the totals
} // end of for loop
var avg = totals / numOfRolls; // calc the average from the total
document.form1.average.value=avg; // update the text box
// update the roll hits history display
while (c<6)
document.form1.rollHistory[c].value=rollHist[c];
} // end of function roll
help, cannot turn for loop into a while loop.
for works well, just need to make an equivalent while
re wrote to look like such and nothing happens @mwilki7