Use of semicolons in ES6 : <p>I was under the impression semicolons became obsolete with ES6. However, I came across this today:</p>

<p>Doesn't work:</p>

<pre><code>let i = 0

[0, 1, 2, 3, 4, 5, 6].forEach(item =&gt; console.log(item))
</code></pre>

<p>Works:</p>

<pre><code>let i = 0;

[0, 1, 2, 3, 4, 5, 6].forEach(item =&gt; console.log(item))
</code></pre>

<p>Why is the semicolon necessary here, and when should I use them?</p>
