It would be nice to have this code run when the user clicks a button rather than running automatically. Let's add a button called addUncutGems. We need to create a function called addMovie(). It's going to be an arrow function. Next, we're going to move this functionality up into our function.
Now we need to connect this function to this HTML element. The way we can do that is we can use the elements on event handlers. One of the events that elements handle by default is onclick, which we can assign, addMovie, to when a user clicks this button.