11/11


#1

for(i=0;i<10;i++;) {
  document.write("this loop ran"+i+"times<br/>");  
};

var counter = 1;
while (counter <=10) {
    document.write("this loop ran"+counter+"times<br/>");
    counter++;
};

var counter2=1;
do {
    document.write("this loop ran"+counter2+"times<br/>");
    counter2++;
} while(counter2 <=10);

this is my code but i get unexpected token ! been searching for a hour now but cant seem to find my mistake some help would be appreciated!


#2

first line:

for(i=0;i<10;i++;)

there is a semi-colon after i++, which shouldn't be there.


#3

AAAh thanks you are my hero for today :slight_smile: