JSFiddle - React, Tailwind, and code Playground

JavaScript

var context = new webkitAudioContext();
var gain = context.createGainNode();
gain.gain.value = 0.05;
var osc = context.createOscillator();
osc.type = 0;
osc.frequency.value = 440;
osc.connect(gain);
gain.connect(context.destination);
osc.noteOn(0);
//osc.noteOff(0);