If you put multiple statements on a line it is necessary to separate them
const i = 5 ; var j = i + 1 ; alert (j) // not needed at end of line
{alert(i);alert(j);alert(k)} // not needed before or after curly bracket
Confusingly it seems to be required after a
do{...} while (...) ;
but should be omitted after
while (...) {...}
If you have a very long "for" statement and break into multiple lines, I believe they are needed
for (i=0 ;
i < len ;
i++) // no semicolon before round bracket
{ ... }
There are definitely cases where you don't want them
if (i == 1) ; { alert("hi") }
(if the test is true it does nothing, and always does the alert)
Regards, ah