title: URL is not defined in node.js
body: <pre><code>let url = new URL("https://stackoverflow.com/questions/ask")
  </code></pre>
  
  <p>It will get an error like this: </p>
  
  <blockquote>
    <p>URL is not defined</p>
  </blockquote>
  
  <p>Actually, in modern browsers, it works well. However, if you run it in the <code>node.js</code> environment, you will get an error like that.</p>
  
  <p>I researched the <a href="https://nodejs.org/api/url.html#url_the_whatwg_url_api" rel="noreferrer">documentation</a>, it says it's a global class:</p>
  
  <blockquote>
    <p>Browser-compatible URL class, implemented by following the WHATWG URL
    Standard. Examples of parsed URLs may be found in the Standard itself.
    The URL class is also available on the global object.</p>
  </blockquote>
  
  <p>So, what's the problem?</p>