JavaScript really illustrates the ultimate path-dependence of evolution. It got widely deployed during a boom time and therefore we are stuck with it forever.
(It's not _just_ JavaScript that one should get rid off, but the abuse of the whole HTML+X set of stacks to implement interactive Web applications. There must be a better way than HTML/CGI, HTML/XML, Java applets etc.; WASM could be part of a solution, but not a solution in itself., as there should be standard UI elements etc.)
Personally, I wouldn't want to touch server-side JS with a 10 foot barge pole.
It actually worked decently well, but was due to Java needlessly verbose.
WASM lets us run other languages efficiently in the browser but that just opens the field to a lot of languages, not one language to rule them all.