3.1.5 Playing sound effects
Playing sound effects is very simple. First we need to find the media element through its name and we stop it to ensure it is at the beginning state. Then we invoke the play method. The following code shows this approach:
var sfx =
You can play the game built in the tutorial here.