This forum is now read-only. Please use our new forums! Go to forums

0 points
Submitted by Ikillu
over 10 years

Answer

heres the answer guys.

  for($i = 10; $i < 101; $i = $i + 10) {
      echo $i;  
  };
  

You might have to refresh a couple times, but delete the space between for and (), and it should pass.

Answer 528d6d9f548c358e060009d2

0 votes

Permalink

To be clear, the issue here is not the space between the for and (. It’s a browser issue where the console is displaying the output of your program and it updates the console every time you change the code. So before you complete the for loop’s exit conditions, such as updating the $i variable, the console has already started executing the code and it enters an infinite loop. Changing the code by deleting a space and refreshing the browser is a fix as you mentioned, but it is the refresh that is necessary to get it to re-execute the updated code.

points
Submitted by Dan
over 10 years