You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes it should change, Also we can improve it more because still you're using string concatenation.
try this ->
var myhtml = [];
$.each(reallyLongArray, function (count, item) {
myhtml.push('<li>',item,'</li>'); // now better
});
$('#ballers').html(myhtml.join(''));
On https://github.com/shichuan/javascript-patterns/blob/master/jquery-patterns/append.html there's a slight consistency error with your other patterns. It is recomended to use array.push() and then join it instead of appending string over and over
So, instead of
Should be
The text was updated successfully, but these errors were encountered: