title: BrainJS ReferenceError: brain is not defined
body: <p>I'm following a tutorial on how to work with neural networks with brain.js when I try to run the code it gives me a ReferenceError: brain is not defined i already installed via npm and have the CDN on the HTML.</p>
  
  <pre><code>const net = new brain.NeuralNetwork({ hiddenLayers: [3] });
  
  const trainingData = [
    { input: [0, 0], output: [0] },
    { input: [0, 1], output: [1] },
    { input: [1, 0], output: [1] },
    { input: [1, 1], output: [0] }
  ];
  
  net.train(trainingData);
  
  console.log(net.run([0, 0]));
  </code></pre>
  
  <p>here´s the index.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="ie=edge"&gt;
      &lt;title&gt;Document&lt;/title&gt;
      &lt;script src="//unpkg.com/brain.js"&gt;&lt;/script&gt;
  
      &lt;script src="index.js"&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  ````
  </code></pre>