Long string without breaks | var sum = 0;
for (var k = 0; k < 5; ++k)
sum += ('This is a super long error that was thrown because of Batman. When you stop to think about how Batman had anything to do with this, you would get nowhere fast.').length;
| ready |
Long string with breaks | var sum = 0;
for (var k = 0; k < 5; ++k)
sum += ('This is a super long error that \
was thrown because of Batman. \
When you stop to think about \
how Batman had anything to do \
with this, you would get nowhere \
fast.').length
| ready |
Long string with concats | var sum = 0;
for (var k = 0; k < 5; ++k)
sum += ('This is a super long error that ' +
'was thrown because of Batman.' +
'When you stop to think about ' +
'how Batman had anything to do ' +
'with this, you would get nowhere ' +
'fast.').length
| ready |
Long string with concats on one line | var sum = 0;
for (var k = 0; k < 5; ++k)
sum += ('This is a super long error that ' + 'was thrown because of Batman.' + 'When you stop to think about ' + 'how Batman had anything to do ' + 'with this, you would get nowhere ' + 'fast.').length;
| ready |
Long string with concats on separate statements | var sum = 0;
for (var k = 0; k < 5; ++k) {
var errorMessage = 'This is a super long error that ';
errorMessage += 'was thrown because of Batman.';
errorMessage += 'When you stop to think about ';
errorMessage += 'how Batman had anything to do ';
errorMessage += 'with this, you would get nowhere ';
errorMessage += 'fast.';
sum += (errorMessage.length);
}
| ready |