It works:
alert('foo\
bar'
)
But this causes a syntax error:
t='test';
alert('<tr><td><b>' + t + '</b></td>\
<td></td><td>')
error:
SyntaxError: unterminated string literal
They must be the same, why does the first one work, and the second one fails?
source
share