Clear Images

This lesson will teach you how to remove all the photo references from Cloud Firestore.

Set up Your Clear Button #

We start by creating an HTML button. We will add an id to it, so we can attach an event listener to it with our JavaScript. Since it’s a button, the event we want to listen for is a click. We will get to that in a moment but as you can see from the code below, the HTML is pretty straight forward.

We will be using all the code from the previous lessons as we build in the additional functionality of clearing the photos.

Get hands-on with 1200+ tech skills courses.