I am making a game with HTML5 and JavaScript.
How could I play game audio via JavaScript?
I used this method to play a sound...
var audioElement; if(!audioElement) { audioElement = document.createElement('audio'); audioElement.innerHTML = '' } audioElement.play();