I would like to play a sound file two times in HTML
<!DOCTYPE html >
<html>
<header>
<script>
var snd = new Audio("hello.wav");
snd.play();
snd = new Audio("hello.wav");
snd.play();
</script>
</header>
<body>
hello
</body>
</html>
However it is only played once.
Note: Playing a file once is covered here Playing audio with Javascript?
Edit after answer
To determine the number of repetitions use
var noOfRepetitions = 3;
myAudio = new Audio('hello.wav');
myAudio.addEventListener('ended', function() {
noOfRepetitions = noOfRepetitions-1;
if (noOfRepetitions > 0) {
this.currentTime = 0;
this.play()};
}, false);
myAudio.play();