Task 2: Draw 50 different images
Now that you understand the code from Task 1, you are going to implement a new function.
Your function will output
50 different images to the
#output_container
div element when the "Show
Images" button is clicked. Tips:
- Make a function called
drawImagesDifferent()
. It should behave similarly to the function in Task #1, except each iteration should add a different image to the container (see the pattern below):- Image 1: https://picsum.photos/200/200?random=1
- Image 2: https://picsum.photos/200/200?random=2
- Image 3: https://picsum.photos/200/200?random=3
- ...
- Image 50: https://picsum.photos/200/200?random=50
- Don't forget to attach the function to the button's click event handler.
- Implement the "Clear" button too.