It depends; which version of JavaScript are we talking about here? ES6+ or something out of the medieval pre-ES5 jQuery-plugin-infested dystopia of the early 2000's?
Imagine the web is powered by COBOL :shudders: and JavaScript exists as it does today (the syntax, tooling, and libraries) then it would still be a good tool to solve many problems, so people would use it, even if it didn't run in the browser. Hell, we would probably even have a transpiler named cobel that turned JavaScript into COBOL. But that could never be the case; it's a paradox, a catch-22. JavaScript never could have become what it is today had it not been baked into NetScape ~22 years ago; nobody would have been forced to use it, so it never would have gotten better.
JavaScript is great.... because we had no other choice but to make it great. Prior to ES6, JavaScript was a terrible language and an absolute dread to work with. So you know what? We made it better. Now it's actually my favorite language. ...well TypeScript is, but TypeScript is JavaScript so yeah. Some of greatest weaknesses in the JS of yesteryear have lead to many of the strong features that make the language so dynamic and expressive.
I should also note, that JavaScript is only as good as its community, which according to GitHub stats, is larger and continues to grow more rapidly than any other language by far. The reason why people actually enjoy JavaScript today is the huge amount of awesome shit out there on NPM. If we had ES6+, but still looked to jQuery and friends as cutting-edge, then no, it JavaScript wouldn't be nearly as popular
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.
Javascript is just another language, but check these facts: Js is used in browsers, js is used by Node, js is on android and iOS thanks Cordoba All these facts have a common factor, js is run on a browser And this creates another need, the need of more tools for development. Example canvas This makes developers create tools for JavaScript
In summary js is totally dependent on a browser and wouldn't be what is today thanks the browser
Sorry for bad english!
Of course not. Especially if the lowest common denominator that was supported across all browsers was something much better thought out than Javascript.
But it could have also meant that you would have a proliferation of several languages supported to various extents in different browsers. In absence of a common denominator it is very unlikely that web-development ecosystem (especially frontend technologies) would have been as rich as it is today.
Having a standardized language that is approachable to new-comers, despite its warts, has played a key role in evolving the frontend ecosystem and propagating the popularity of rich client applications.
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.
Christopher Smith
No.