> You can't practically run any language you want on the browser, only one, and it's JavaScript
Everybody knows that, but are you aware of the history of that? Why Javascript is called Javascript, despite not being in any way related to Java?
Java was originally aimed to run in the browser as Aplets. That required a plugin of course, and those have since fallen out of favour for good reason. But Java was originally the language that ran in the browser, and Sun specifically marketed it for that. And then Netscape introduced their own language called Javascript specifically so people would associate it with Java, but it had the advantage that it would run in the browser without the use of plugins. And Netscape was so dominant that they could dictate this sort of thing.
Plenty of Web Aplets have been written at that time, but with browsers abandoning plugins, they've become obsolete. And requiring a plugin before it runs was definitely an obstacle.
Instead Java became the preferred language on the server, and it took a very long time before Javascript got any traction there. It has that traction now, and the advantage of running the same code in browser and server is definitely an advantage, but there's a lot of history before that.
And while Java's popularity is certainly dwindling (and deservedly so, if you ask me), it's coming from an extremely high popularity and has a very long way to go before it's gone. Because it did win almost everywhere outside the browser.
https://experttal.com/blog/top-programming-language-trends-i...
>Top Programming Language Trends in 2023
>Java Won’t Be as Popular as It Was
>In a similar vein, Java — a language central to the emergence of the software industry as we know it today — increasingly appears to be past its prime.
>Java slipped out of the top spot on the TIOBE index — a position it had held for nearly two decades — a couple of years ago. As of 2023, there's every indication that Java won’t recover the top spot.
>Although Java will likely remain widespread over the coming year, it's hard to imagine it returning to its former stature as one of the most popular languages. On the contrary, we suspect Java will continue to decline in popularity over the coming year and beyond.
https://marketsplash.com/javascript-statistics/
>50+ JavaScript Statistics For 2023 Trends & Facts
>Microsoft introduced TypeScript in 2012 as an extension of JavaScript, incorporating optional typing. This adaptation retained the syntax and essence of JavaScript while implementing supplementary features essential for developers. The contrast between JavaScript and TypeScript is noteworthy, as the latter presents heightened productivity and simplified maintenance for expanding codebases.
>For this reason, TypeScript transcends being merely a fleeting JavaScript trend; it has evolved into an established language. The most recent survey from 2022 indicates that JavaScript stands as the most utilized programming language, boasting a considerable 78% adoption rate among developers. This survey stems from the State of JS Survey.