javascript - Is it possible to create a multiline string? -
i´m trying create multiline string in google apps scrtip, in javascript:
var temp = \`hello world!\`;
i have text want analyze don't want pre-process it.
is possible?
if, example, had real long string extended out past right margin in code editor, , wanted put on multiple lines in editor don't need scroll right read it, still want string analyzed 1 long string, can use:
var = 'some text\ more text here\ third line.';
the above text in variable a
print 1 line.
if want cause string wrap, in email, or dialog box, can use non-printing newline control characters \n
var t = 'first line \nsecond line \nthird line';
the above string in variable t
print on 3 lines.
note did not put space after \n
or next line start space.
if using html, can use <br>
Comments
Post a Comment