I think the web has played a huge part in making JavaScript famous. More and more people wanted to build cool websites and hence, everybody learnt JavaScript.
Perhaps post that, some folks must've thought, "hey, we have a nice thing going on here and there's a huge community to support us, so why don't we expand JavaScript and build frameworks on top of it?"
There are lots of nice languages out there, but not all of them are famous as JavaScript. So, to answer your question, I don't think JS would be famous if it didn't run on the browsers.