This is ignorant. The rise of Javascript had little to nothing to do with the fall of Java applets, which failed due to their own issues.
Java applets were already considered a dying tech when Google made their push to heavily-Javascript-dependent apps, and the performance requirements that led to.
Note also that despite the similar name, Javascript and Java have technically nothing to do with each other. It is a quirk of business history [1] that Netscape and Sun partnered to name Javascript as it is when Sun was first pushing Java as a web technology.
There was no DOM back in the early days of Javascript. The page was rendered in a single pass, you could inject text and markup via document.write() and anything "dynamic" was accomplished by reloading an IFRAME. Remember, these were the days when too many tables would crash your browser; I recall the early demos of Gecko showing deeply nested tables, and all styling was with font tags still.
Netscape was still trying to sell a browser, and they wanted a common language on the frontend and backend, so Javascript was also on Netscape Server.
I would be willing to contend that in the view of "Java applets are where the web is going" back then, the difficulty of communication between the applet and the enclosing page was something that needed some scripting glue and that JavaScript, from its inception, was to be that glue. It took about a year to get it working, but this was the initial goal of JavaScript.
Java applets were already considered a dying tech when Google made their push to heavily-Javascript-dependent apps, and the performance requirements that led to.
Note also that despite the similar name, Javascript and Java have technically nothing to do with each other. It is a quirk of business history [1] that Netscape and Sun partnered to name Javascript as it is when Sun was first pushing Java as a web technology.
[1] https://en.wikipedia.org/wiki/JavaScript#Beginnings_at_Netsc...