I heard at someplace that I can't remember right now, than it was a smart idea to shorten longer strings into shorter substrings. Should I do this? What are the pros, and cons?
Sample:
var str = "some extremly long string for the sample I am making for this Stack Overflow question. Must add more words to make longer.";
alert(str);
or
var str1 = "some extremely long string";
var str2 = "for the sample I am making";
var str3 = "for this Stack Overflow question.";
var str4 = "Must add more words to make longer.";
alert(str1 +str2 +str3 +str4);