You made two attacks.

What makes JS inappropriate for the backend? It’s very simple: JS is an awful language. It’s inappropriate for the frontend, as well, where I strongly recommend using transpiled languages such as Amber, ClojureScript, GopherJS, Transcrypt, Cheerp, Opal, etc. I’m perfectly satisfied to use JS as a transpiler target, but the language is far too sloppy (with horribly inconsistent semantics) to directly program in. Nearly any other programming language I can think of has a more solid foundation. JavaScript was originally designed as an off-the-cuff scripting language for web browsers. It was never intended for serious software engineering and no matter how much ECMA try to spruce up the language, without fixing its basic, fundamental problems, JavaScript remains unsuitable for writing industrial strength software. If you want a fun, light language to do relatively simple tasks, JS is fine, but let’s not pretend it can compete with the likes of Go, C#, Java, Python, C++, etc.

As for code sharing, this isn’t always a good thing, and it’s especially bad as your infrastructure grows where you have tons of micro-services and front-end apps that are tightly coupled thanks to shared code. Someday, we may no longer be using JS as a transpiler target, as WebAssembly gives us the freedom to use any proper language we want. Then code sharing no longer makes any sense, unless you wish to forever shackle yourself to a broken language.