News for hackers. Stuff that matters.
Re:JavaScript from 2001 on India's largest private bank site by 29athrowaway on Tuesday March 16, 2021 @02:07AM (#26473534)
Strings are immutable, so each one of these concatenations creates a new string with slightly more content.

I have seen modern JavaScript that can be just as bad as this.

Re:JavaScript from 2001 on India's largest private bank site by pwdisswordfish0 on Tuesday March 16, 2021 @10:26AM (#26477091)
Most modern JavaScript I've seen is worse than this.

At least it's not a minified blob built up from dozens of repos whose primary purpose is to make its authors look (feel) productive/prolific.

Re:JavaScript from 2001 on India's largest private bank site by minitech on Tuesday March 16, 2021 @08:10AM (#26475641)
Not really correct for JavaScript (among others). All modern implementations optimize repeated appends in cases like this. They all have ropes, too.