How to make a mute on a 5 second timer?

Hello! There is code:
if (data.timer == '0:5' && data.check = = true) {
 if (sound == 'on') {
$('#timer-tick-last')[0].play();
}
 }

It plays the sound once, when the timer 00 05 seconds
if (_$('timer')) {
$('#main_timer1').text(minute);
$('#main_timer2').text(second);
 if (sound == 'on') {
$('#timer-tick')[0].play();
}
 }

And here is the code that plays the sound for the entire time set on the timer.
How to make the sound stop, for 00 05 second and began to play every second?
July 9th 19 at 12:51

Find more questions by tags JavaScript