In Python any newline that can end a statement will end a statement, unless it is escaped with a backslash.
I suppose that Javascript's rules are equally deterministic, but I don't know if you could summarize Javascript's rules for ending statements in a single sentence.