Javascript: Not Everywhere
Having a single syntax to remember provides a short term benefit but with some long term downsides.
Having a single language across your client and server code isn’t necessarily a benefit. The challenge of switching between frontend and backend isn't the language’s syntax or standard library; it's about the difference in the runtime environment. The server and client environments are fundamentally different. You can't use `window` in server-side code, and you can't use Node's file system API in the browser. I believe this false sense of continuity lead to more subtle bugs then difference in syntax ever does.
Using different languages for front end and back end makes it easier to tell where your code is running. When I see PHP in my Laravel app, I know it's server-side. When I see JavaScript, I know it's running in the browser. This distinct separation helps reduce mistakes, improves maintainability, and makes it much easier to understand where each part of the code belongs.
Learning programming is tough, and starting with one language might make things easier for beginners. But optimizing for onboarding juniors might not be the right call. I've seen plenty of new programmers learn two different languages—it might take a few months, but it’s very common. In a mature team, developers are already handling multiple languages: JavaScript, CSS, HTML, YAML, JSON, SQL—you name it. Adding a separate language for the back end isn’t that large of a burden, and actually helps keep things organized.
Other languages bring a lot to the table: some have more robust frameworks (e.g. Laravel, Rails, or .NET), others are much faster (e.g. Go), and some have better libraries for math and scientific tasks (e.g. Python). Depending on your domains’ needs, JavaScript just isn't always goingt the best choice for server-side code.
At the end of this day, this is pretty subjective. Personally, I find that using a different language on the back end tends to lead to clearer, more productive development. Some you will have had a different experience. That said, I do believe this approach fosters better organization, reduces ambiguity, and ultimately results in a smoother development process. A single language reduces the amount of syntax you need to remember, but I think the impact of that problem is overstated.

