alert and print

 

Why is the alert function executed earlier than the print function?

void OnStart()
  {
//---
   int x,y;
   for(x=0;x<100;x++){
      Print(x);
   }

   Alert("code is over !!!");
  }

 
kamalzadeh:

Why is the alert function executed earlier than the print function?

void OnStart()
  {
//---
   int x,y;
   for(x=0;x<100;x++){
      Print(x);
   }

   Alert("code is over !!!");
  }

Alert executes only when for loop completes