Learn Create Your Own Split Screen

Next Page

Try making some changes to the while loop.

What if the counter variable increases by 10 instead of 5 ?

What if it increases by 1 ?


But make sure the corner variable keeps increasing each time through the loop.

If it stayed the same or got smaller, then the condition "(counter < 100)" would always remain true, and you'd have an infinite loop and your browser would "hang" or lock-up.

If that happens, you'll need to reload the page - not the end of the world, but a little untidy.