Web Audio API:How to connect nodes

Below is a working copy-and-past usable piece of code that explains how to connect Web Audio API nodes. It uses an Oscillator Node and a Gain Node.