title: What is the difference between const and const {} in JavaScript
body: <p>When I study electron, I found 2 ways of getting BrowserWindow object.</p>
  
  <pre><code>const {BrowserWindow} = require('electron')
  </code></pre>
  
  <p>and</p>
  
  <pre><code>const electron = require('electron')
  const BrowserWindow = electron.BrowserWindow
  </code></pre>
  
  <p>What is the difference between <code>const</code> and <code>const {}</code> in JavaScript?</p>
  
  <p>I can't understand why the <code>const {}</code> can work. Do I miss anything important about JS?</p>