export function playSound(fileName) {
    let audioSource = document.createElement("source");
    audioSource.setAttribute('src', fileName);
    audioSource.setAttribute('type', 'audio/mp3');

    let audioPlayer = document.createElement("audio");
    audioPlayer.appendChild(audioSource);
    audioPlayer.onended = () => {
        audioPlayer.remove();
    };

    audioPlayer.play();
}
