corpus
05-07-2006, 06:03 AM
I need help with this piece of code please:
for(count=1; count<4; count++)
{
number=prompt("Enter a number please");
total=(number+number+number);
}
document.write(total);
My problem lies in the line with total=.
I can't figure out how to add all the results aquired from number's prompt function. Can someone please help?
for(count=1; count<4; count++)
{
number=prompt("Enter a number please");
total=(number+number+number);
}
document.write(total);
My problem lies in the line with total=.
I can't figure out how to add all the results aquired from number's prompt function. Can someone please help?