How do I click a link with javascript? : <p>How do I click this using JavaScript?</p>

<p>The "a" only have href and only id on the "div"</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;div id="id"&gt;
  &lt;a href="link"&gt;
    &lt;/a&gt;
  &lt;/div&gt;</code></pre>
</div>
</div>
</p>
