Created 20 years ago, it’s gone a very long way since its humble beginnings.
Being the first - and the only - scripting language that was supported natively by web browsers, it simply stuck.
In the beginnings, it was not nearly powerful as it is today, and it was mainly used for fancy animations and the marvel known at the time as DHTML.
Many things were introduced in the platform, with browser APIs, but the language grew quite a lot as well.
- high level: it provides abstractions that allow you to ignore the details of the machine where it’s running on. It manages memory automatically with a garbage collector, so you can focus on the code instead of managing memory locations, and provides many constructs which allow you to deal with highly powerful variables and objects.
- dynamic: opposed to static programming languages, a dynamic language executes at runtime many of the things that a static language does at compile time. This has pros and cons, and it gives us powerful features like dynamic typing, late binding, reflection, functional programming, object runtime alteration, closures and much more.
- dynamically typed: a variable does not enforce a type. You can reassign any type to a variable, for example assigning an integer to a variable that holds a string.
- weakly typed: as opposed to strong typing, weakly (or loosely) typed languages do not enforce the type of an object, allowing more flexibility but denying us type safety and type checking (something that TypeScript and Flow aim to improve)
ES2015, also called ES6, was huge as well.
Since then, the ones in charge decided to release one version per year, to avoid having too much time idle between releases, and have a faster feedback loop.