play a notification sound when a modal popup is opened code example
Example: in if condition how to set alert music in javascript
if (x > 10) {
var snd = new Audio('/alarm.mp3');
snd.play();
alert("Thank you!");
}
if (x > 10) {
var snd = new Audio('/alarm.mp3');
snd.play();
alert("Thank you!");
}