Image Slider Lab
You will use an array of image URLs to simulate the actual image slider. Your main goal is to implement the proper cycling of the images when the respective buttons are clicked.
In order to achieve this, you need to:
- Create button elements with specific ids for previous and next buttons.
- Create an img element with a specific id to show the images.
- Initialize the img element's 'src' with the first image URL from the images array.
- Implement click events for both buttons to cycle back and forth through the images.