The point is that connection string seems to have been implemented as some sort of Singleton that other pieces just reached out and grabbed directly. As soon as you have that, you put people who need to swap it out in a different way for whatever reason in a world of hurt. But I could go on and on about poorly written code I’ve seen in strongly-typed languages (though I’ve done more in ActionScript than C# so I could give more examples from there haha).
I think the real issue with JavaScript is there’s a significant fraction of people who have never seen or experienced a clean code base, so they just don’t know. But I think this happens in all languages. There is an attitude, though, in JavaScript that it really doesn’t matter, if it “works,” then one way of doing things is as good as another. Just look around on Medium and you’ll find all kinds of articles about why this or that best practice the author clearly doesn’t understand is out of date and a waste of time.
But I have found that if you really get a grip on code quality on your team you wind up with people who can see and feel the difference and are pretty passionate about never going back.