Next, lets see how you can call a JavaScript function when a button has been clicked. To call a JavaScript function from a button click, you need to add an event handler and listen for the click event from your