Im using java script for a simple if else statement and was trying to add some audio to it. Play one song when its right, and another if its bad. Here is what I have minus the actual if statements. I commented out the audio portion because that broke my code and couldn't get it working.
if (x is true) document.write("Good job!<br />"); /*<audio controls = "controls" autoplay = "autoplay" loop ="loop" > <source src = "congrats.ogg" type = "audio/ogg" /> <source src = "congrats.mp3" type = "audio/mpeg" /> <source src = "congrats.wav" type = "audio/wav" /> Your browser does not support the audio element </audio>*/ else document.write("Boo!<br />");
Any help is appreciated!