I am attempting to declare a new audio element in JavaScript. This is what I have written.
//Creating audio object
var audio = document.createElement("AUDIO");
audio.src = '/beats/vibe/lofi2.wav';
audio.controls = true;
audio.loop = false;
audio.autoplay = false;
I am receiving the following error: 'document' is not definded [no-undef]
Any clues as to why this wont work? Thanks!