Why Semicolons are needed for every line of JavaScript?

All statements in JavaScript must end with a semi-colon, to indicate that this is where the statement ends. If you don't include these, you can get unexpected results.

This ends with the strange behaviour of your code.

Comments