4 ms·
Ask HN: What made JavaScript so popular?
Compared to other programming languages and frameworks out there (JavaFX, golang, PHP, Ruby on Rails), what made JavaScript so popular?
- detaro 9y agothat it works in the browser
- collyw 9y agoIts the only language that runs in all browsers.
- tdbgamer 9y agoIt's mostly part of everyone's dream of using the same language for frontend and backend code. When Node/NPM became popular and built up lots of useful libraries and could be used for backend code, people started trying to use Js everywhere. It helps that a lot of the ecosystem is based around asynchronicity.
- BFatts 9y agoIt's the only language that runs in your web browser natively. It was designed to be a simple scripting language to make web pages interactive. Written by Brendan Eich, it was a quick project that should feel like C but be easier to learn. It doesn't require you to learn about types and type safety which is a topic that can be hard to grasp. It's functional and expressive, and those two things make it fairly powerful. Finally, it has the backing of NodeJS which runs on the server so, as was previously pointed out, means you can write code for both the server and client in JavaScript so it's portable. While it's debatable how easy JavaScript really is, most developers who bitch about it love it. It has its flaws, like many other languages, but I'm still surprised by the number of newer and better ways to do things in plain old JavaScript.