Learn Create Your Own Split Screen

Next Page

Here's an even better example. We define our own "fillCircle" function that automatically changes the colour of the circle depending on whether the radius is less than 50 pixels or not.

What do you think would happen if the radius of a circle was exactly 50 pixels? Before you answer, think carefully about how the condition is expressed and how literal-minded computers are.

Make your prediction, then try it and see what happens..