Why isn't JAVA (JSF) still popular to make web pages? Why aren't we coding binary apps that run remotely instead of loading tons of frameworks built over each other under the browser? Why isn't Flash popular anymore, if it was so great? Or Silverlight?
The answer of this might not be as simple as you could think.
Javascript is not popular just because of browsers, instead, it is definitely the main reason why people use it so much.
But the reason why so many people like Javascript is related to the nature of the language. It is a kind language for someone who wants to learn to code, at the same time, the diversity of coding techniques that you can apply to it, are another strong point of the language, and also why so many people like it.
Javascript abstracts you from data types, memory management, teaches you about data structures, hierarchies, concepts of parents and children, objects, functions, arrays, synchronization, callbacks and lots of other things that are slowly brought to you as you spread your knowledge, increasing your awareness of what it really means to code and to be a programmer.
Nodejs was another reason why Javascript became so popular. It was the missing link between client and server. It is easy to learn, because of the familiar language you probably already knew, and above all, it complemented your programming awareness by dealing with all the actions that you couldn't or shouldn't do from the browser.
In conclusion, I really think that Javascript would still be very popular without the browser, and valuable as a learning language, especially for new programmers who don't know where to start.