What is the best practice for line continuation in JavaScript? I know that you can use \ for strings. But how would you split the following code?
var statement = con.createStatement("select * from t where
(t.a1 = 0 and t.a2 >=-1)
order by a3 desc limit 1");
If I properly understood your question:
For readability, it is fine to align
+operator on each row:Anyway, unless you’re using Ecmascript 2015, avoid to split a multiline string with
\, because: