In most cases[0], Js &quot;looks&quot; at the next line to see if it could continue the current statement, in which case no semicolon is inserted.<p>[0] Not true for &quot;restricted productions&quot;, which include naked returns, and some other &quot;special&quot; cases.