Consider a simple slideshow app that lets the user navigate through a list of pictures using a Next button, wrapping back to the first picture when the last picture is reached. Fig. 6 shows the App Inventor code for this app. The code uses two global variables: (1) pictures, which holds a list of the pictures; and (2) slideIndex, which holds the index of the picture currently displayed by the SlideImage component. For simplicity, we'll assume that pictures contains a fixed nonempty list of pictures, but it could be populated by another process (e.g., taking pictures with the camera).