It's fair to say that maintainability directly relates to the complexity, scale and code quality of the application itself. If it's difficult to write, it will most likely be difficult to maintain.
There are plenty of maintainable large-scale .NET and Java applications out there. Yet in my experience, there are just as many unmaintainable ones as well. Complexity and magnitude of a project are certainly factors. But the developers' experience, the development process and the technical architecture are equally important, if not more important.
Larger than life
You should never write 'large applications'. You should write small, maintainable modules; that are simple to test, read, write and understand. And if you do that correctly, it doesn't really matter what technology stack you use. If you write SOLID code, you will be able to maintain it. In all technologies, in every team, in every language.
- Always split code into smaller and reusable pieces. Better yet, use frameworks that enforces you to do so. Always write SOLID code.
- Write unit tests and/or E2E tests
- Never, and I mean never, store variables in the global scope
- Use code quality tools like JsLint or JsHint
- Make team-wide-rules about code structure and syntax rules
- Automate as much as possible
- Don't use thousands of small libraries and frameworks for simple features. If you do, you'll have to maintain and upgrade each library individually!
- Use a package manager
- Learn the basics of Node; Grunt (or Gulp) in particular