Create a confetti animation with HTML canvas and JavaScript

Have you ever clicked a button and seen a confetti animation explode onto the screen? Or visited a website where the whole screen is covered in that same confetti animation? Let’s make our own. In this tutorial, we’re going to make some dynamic confetti effects with JavaScript and the HTML Canvas API.