I am making a game with HTML5 and JavaScript.
How could I play game audio via JavaScript?
http://www.schillmania.com/projects/soundmanager2/
SoundManager 2 provides a easy to use API that allows sound to be played in any modern browser, including IE 6+. If the browser doesn't support HTML5, then it gets help from flash. If you want stricly HTML5 and no flash, there's a setting for that, preferFlash=false
It supports 100% Flash-free audio on iPad, iPhone (iOS4) and other HTML5-enabled devices + browsers
Use is as simple as:
Here's a demo of it in action: http://www.schillmania.com/projects/soundmanager2/demo/christmas-lights/