No. By a large margin the main reason for JavaScript's success is that it is the only language with first class support in browsers.
And why was it the only language in the browsers? And why did it spread to servers?
Well, what alternative was there? At the time for the bowser - none as far as I remember. For the server ... Java was bloated and PHP even more ugly. So I also choose node.
loading story #50626926