What is the difference between adding a semicolon and not adding a semicolon in a function call? The relationship between expressions and statements, and how to distinguish expressions from statements.

for example:
the difference between fn () and fn ();.
A statement ends with a semicolon. (semicolons can be omitted)
but fn () this should be a function call expression, why sometimes add a semicolon.
is fn (); with a semicolon a statement? How to understand the
statement? What is a sentence?

Mar.10,2021

js is a weak language. In other languages, the addition of a semicolon makes a big difference. In js, a semicolon indicates the end of a statement. In fact, it only affects the next statement written on the same line, such as

.
//
fn() var a=''//Unexpected token var
//
fn();var a=''//
//
fn()
var a=''

the interpreter adds a semicolon when parsing without a semicolon. The interpreter may add the semicolon incorrectly, so it is best to add the semicolon yourself.


Don't need a semicolon, just enter. It's OK
it doesn't make much difference

well, take a look at the python tutorial when you are free.
you don't have to read too much, you can read it
and then you understand

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b40276-2c4e1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b40276-2c4e1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?