I am using the function below to attempt to play the array (a,b,c are all Sound instances initialised beforehand) of sounds (notes) sequentially (a is played and ends, then b is played and ends etc.). However instead of playing each sound one after the other it is playing all the sounds together in one go. How can this code be modified to play the sounds sequentially?
const playSound = () =>{
const notes = [a,b,c,a]
notes.forEach(element => {element.setVolume(1).play()});
}