Use the addEventListener() method to attach an "ended" event to an audio element.
Press play and wait for the audio to end.