Bad programming is just bad programming, no need to pull what language is being used into it. Just happens to be JavaScript because that's what browsers natively support. But if Python (or whatever) was used instead, the very same programmer would have done the very same mistake.
Counterpoint: It's not what programming languages do, it's what they shepherd you to
https://nibblestew.blogspot.com/2020/03/its-not-what-program...
The sorting is actually fine. On my Mac the sort completes in less than 1ms.
The performance issue is because of all of the hooks of the svelte framework trying to do their thing in the middle of the sort, and then another frame-sizing script trying to do its thing in the middle of the sort. This is an endemic problem in Angular apps as well.
Not javascript's fault, or even the sort algos fault.
You're right it isn't the language but since js is the only front end language it gets called out.
Just so we are clear, I love JavaScript and write it everyday but I avoid the “modern” eco system like it is the plague.