original
JavaScript does not fill in semicolons at all line breaks: JavaScript fills in semicolons only if the code cannot be parsed correctly without a semicolon.
demo
var b = 1
var foo = 2
var a = b + foo
(123)
// foo is not a function
but there is no filling in the semicolon. Why didn"t you add a semicolon to it? What"s wrong with my understanding?