JavaScript JavaScript Basics (Retired) Introducing JavaScript Your First JavaScript Program

i checked the order that the programme runs on my site. why the 2nd command run after the 1st and 3rd commands complete?

the teacher mentioned in the video that the command would run one after the other right?

2 Answers

Antony .
Antony .
2,810 Points

This is because the behavior of browsers have changed how they handle loops just across the board.

To make things a little more clear and concise, this isn't your fault. It's the browsers. The browsers behavior has changed since the video was uploaded. So in your case, any alert function that gets placed will print out first.

thank you.

Robert O'Toole
Robert O'Toole
6,346 Points

thanks! how can we override this?