I am new to JavaScript and pretty confused about the role of the ; (semi-colon)
. I have the following codes that both run smoothly. None of them runs into errors.
Code 1:
const portNumber = 8080;
const app = express();
Code 2:
const portNumber = 8080
const app = express()
So, it appears the semi-colon is not necessary. So why bother about it at all like in Code 1 if I'd rather concentrate on the rest like in Code 2? Is there any sence in using the semi-colon like in Code 1?