title: Node js - Issue with my syntax in require(module) . When to use {} and when not to use {} in require('module')
body: <p>I have a query with the syntax in the require statement. Please refere the sample code below.</p>
  <pre><code>const nodemailer = require(&quot;nodemailer&quot;);
  const {google} =require('googleapis');
  const {OAuth2}=google.auth;
  </code></pre>
  <p>Some times , I see sample codes which use</p>
  <pre><code>const {&lt;variable&gt;} = require('moduleName')
  </code></pre>
  <p>Other times, I see like below</p>
  <pre><code>const &lt;variable&gt; = require('moduleName')
  </code></pre>
  <p>What is the difference between them?
  Thanks in Advance.</p>
  <p>Grateful to the Developers Community.</p>