let string = "line one
line two";
相当于line one\n line two
,注意第二行的前导空格还在。
let string = "one line \
written over \
several";
相当于one line written over several
,注意前导空格被忽略了。
let string = "multiple\n\
lines\n\
with\n\
indentation";
相当于multiple\nlines\nwith\nindentation
原文:https://stackoverflow.com/questions/29483365/what-is-the-syntax-for-a-multiline-string-literal