title: Closing all app windows when using Electron
body: <p>I am learning to write JavaScript in Electron. I have two windows. A main window and a child window. When the main window closes selecting the X on a windows computer I want it to close the entire app including the child window. The line below works on a Mac PC.</p>
  
  <pre><code>mainWindow.on('closed', () =&gt; app.quit());
  </code></pre>
  
  <p>What is the proper way of doing the same thing for windows pcs.</p>