I maintain a not very large application (250k loc) with Java in the backend, vanilla JS in the front end. Even with a few thousands of JS lines, touching any function is extremely dangerous. Nobody knows who is calling that function and if it will break some UI. Therefore, no refactoring on JS functions is allowed just for precaution. Maybe it’s our fault (the code is 10 year old) but the confidence in the language is low. I can’t imagine a large application with milions of JS lines. The same crappy programmers that make crappy Java apps will create even crappier JS apps because there are so many ways to shoot yourself on the foot.