I've seen a triple semicolon in a few expressions here and there.
Does it have any logical effect?
The closest thing I've seen for an explanation is that it tells the Dean Edwards compressor to ignore that line.
;;; var someVar = 'Rebel';
Semicolons are an essential part of JavaScript code. They are read and used by the compiler to distinguish between separate statements so that statements do not leak into other parts of the code.
Semicolons in JavaScript are optional. In JavaScript, there is a process called Automatic Semicolon Insertion (ASI) which inserts a Semicolon whenever needed but not placed. Semicolons are also used to terminate the statements.
It makes people ask questions on StackOverflow.
Other than that, it does nothing.
Nothing. Absolutely nothing.
Three semicolons, ten semicolons, a hundred semicolons, they all get interpreted to the same result: nothing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With