play an audio javascritp code example
Example 1: play sound javascript
var audio = new Audio("folder_name/audio_file.mp3");
audio.play();
Example 2: js play sound
const sound = require("sound-play");
sound.play("file.mp3");
var audio = new Audio("folder_name/audio_file.mp3");
audio.play();
const sound = require("sound-play");
sound.play("file.mp3");