JSFiddle - React, Tailwind, and code Playground

JavaScript

if (!webkitAudioContext)
    alert("Couldn't play audio. This might only work in Chrome.");
else {
    var context = new webkitAudioContext(),
    oscillator = context.createOscillator();
    oscillator.connect(context.destination);
    oscillator.noteOn(0);
    window.setTimeout(function() { oscillator.noteOff(0); }, 5000);
}