how to play an audio clip using a button html code example
Example 1: play audio javascript
var bMusic = new Audio('welcome1.mp3')
bMusic.play()
Example 2: javascript play sound onclick
var audio = new Audio("soundfile.wav");
document.onclick = function() {
audio.play();
}