could someone please help me to understand why my audio won't play?
html:
<div id = "One" class = "square" onmousedown = "playSound(1)" ></div>
<audio id = "sound1" src = "https://s3.amazonaws.com/freecodecamp/simonSound1.mp3"/>
JS:
function playSound(val) {
var soundToPlay = document.getElementByID("sound"+val);
soundToPlay.play();
}
Much appreciated :)