You're mistaking "JS is forced on people and they have no choice but to make it work" with "it's everywhere so it must be good".
And there is absolutely nothing stopping anyone from developing a browser that natively supports another scripting language. Your arms are untied to end the javascript tyranny once and for all.
There's a ton of stuff that will stop you from making your own browser. The distinction here is that nobody is stopping you to BEGIN making your own browser, but dozens of factors will stop you from making it WIDELY VIABLE later -- which you need if you want anybody else but you to use it.
I think you got hung up on "forced". Obviously nobody is saying that pistols put at somebody's forehead were involved. But IE6 and "This browser is not supported" was a thing back then, and that made people compromise a lot and appeal to early JS stupidities.
Then it snowballed and the rest is history.
Speaking of which, it took CSS ages until its devs finally woke up and started adding native animations and transitions for which JS was required. So you were "forced" using JS for those for quite a long time as well.
Don't argue linguistics, please. I'm very sure you knew exactly what I was talking about.
Everything is not built on top of it.
> It's the language powering the whole web
It’s also not powering the whole web, just a significant part of the client frontend inside browsers.
Allow WebAssembly to directly access the DOM, so you can write whatever language you want and compile it to WebAssembly.
Can you share something else they could've built everything else on top of, instead? Yeah, that's what I thought.
Do you really think a normal junior dev is going to be/should be writing web assembly code to build a basic portfolio website?
Im also curious what language do you think would be suitable instead? And whats your plan to move all the browsers and websites in the world to this new language?
https://i.redd.it/rz3o1yibnc511.png
> And whats your plan to move all the browsers and websites in the world to this new language?
I'm not proposing this, I am saying there should have been options to begin with.
There are a lot of junior developers across the world in different economic situations who might. To think otherwise is just arrogance. Think students, freshers, job-seekers switching industries.
In other words, if your programming language makes it easy for you to shoot yourself in the foot, then it isn't a good programming language to begin with.