How to make the audio file play one song and play the next one directly?

I have an array. It contains the src address of the audio file

how to play the second audio file in the array directly after playing the first audio file

Mar.18,2021

use ended events

    var audio = document.getElementById("audio"); 
    audio.loop = false;
    audio.addEventListener('ended', function () {  
        //
    }, false);

<!DOCTYPE HTML>
<html>
<body>

<audio id="audio" controls="true" autoplay="true">
  <source src="/i/song.ogg" type="audio/ogg">
  <source src="/i/song.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<script>
var audio = document.getElementById("audio"); 
audio.loop = false;
audio.addEventListener('ended', function () {  
    alert('over');
}, false);
</script> 
</body>
</html>
Rookie tutorial: http://www.runoob.com/tags/av.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eaf95b-2269.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eaf95b-2269.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?