prompt user to enter a number to be used as a loop perimeter(ie. number of loop cycles).
Confirm that the user enters a number and if so run it through a parseInt.
within a 'for' loop, initialise the loop counter as 0, ,loop for as long as the user defined value, and increment the counter by 1. Within the loop , doc.write the calue of the loop counter along with a line break.
I can do the prompt, confirm and parseInt...but i wasnt taught properly the 'for' loop, and examples in the book are crap. If someone can finish it off im sure ill work it out... I HAVE A TEST TOMORROW AHHH!
this is what iv done:
var loopp = prompt("How many loop cycles?","");
var loopp = isNaN(loopp);
if(loopp==true){
loopp = parseInt(loopp);
}
thanx guys!!!!!!