title: JavaScript settings. brain js
body: <p>I have downloading VS Code, downloading brain.js using npm, found example but I get this error in console all the time. </p>
  
  <pre><code>Debugger listening on ws://127.0.0.1:31661/83ca1086-743d-46cf-96bc-4bb352980d2b
  For help, see: https://nodejs.org/en/docs/inspector
  Debugger attached.
  /Users/user/Downloads/using-machine-learning-to-determine-light-or-dark/js/index.js:1
  (function (exports, require, module, __filename, __dirname) { const input = 
  document.querySelector("input")
  
  at Function.Module._load (internal/modules/cjs/loader.js:520:3)
  at Function.Module.runMain (internal/modules/cjs/loader.js:719:10)
  at startup (internal/bootstrap/node.js:228:19)
  at bootstrapNodeJSCore (internal/bootstrap/node.js:576:3)
  Waiting for the debugger to disconnect...
  ReferenceError: document is not defined
  index.js:1
  at Object.&lt;anonymous&gt; (/Users/user/Downloads/using-machine-learning-to-determine-light-or-dark/js/index.js:1:77)
  at Module._compile (internal/modules/cjs/loader.js:675:14)
  at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
  at Module.load (internal/modules/cjs/loader.js:589:32)
  at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
  at Function.Module._load (internal/modules/cjs/loader.js:520:3)
  at Function.Module.runMain (internal/modules/cjs/loader.js:719:10)
  at startup (internal/bootstrap/node.js:228:19)
  at bootstrapNodeJSCore (internal/bootstrap/node.js:576:3)
  </code></pre>
  
  <p>How can I solve it?</p>