Because it's not opinionated, it all depends. IMO the code base where I work is very complex but it's very easy to onboard new engineers with it. This is due in part to enforcing documentation and code style guidelines.
The holy grail is a language that enforces guidelines itself, for example: a type system.
This is in contrast to something like Rails which is super opinionated and doesn't give you much of a choice if you as a developer or even as a company as a whole were to disagree with these opinions.
The current movement towards functional programming exemplifies this philosophy.
All I'm saying is JS is more than capable of scaling in both complexity and maintainability.