Javascript carousel

StackBlitz Sample Sourced from this article

I am going to show images with in list, "ul" and "li". Then, I display these images horizontally with css. Next I add two buttons to navigate among images. Finally, I code 7 lines of Javascript to complete this carousel. All done. Here we go. The good thing about this is that this technique is not limited to images, but you can use it for all types of list with different width and heights.