Play random sound for user to identify & get feedback


I’m trying to create an activity for English language students in which they improve their ability to distinguish similar sounds – e.g. word pairs like cash / catch

User clicks Play button and either of the words is played at random
User decides which word they heard and clicks on the button for cash or the button for catch
User gets feedback – either "Correct!" or "Incorrect, try again".

I’ve found the code to make my sound files play randomly, but now I need help with the rest. Please see what I have so far below:

function playSounds() {
var sounds = new Array(
var index = Math.floor(Math.random() * (sounds.length));



Any help would be much appreciated (but the way, I’m a teacher and not a web design guru). Maybe you could give me the code or maybe suggest a plugin that does this.

Pedro Picapiedra 8 months 2020-12-09T18:10:18-05:00 0 Answers 8 views 0

Leave an answer