Web Audio API:Toggle oscillator on and off

The problem
The oscillator NoteOff method doesn't turn off the oscillator and allow for it to be turned back on.

The solution
To turn the oscillator off you must use the .disconnect method. Below is working code that demonstrates how to toggle an oscillator on and off. You will need to replace the image src's with your own.