3 ms·
JS isn't just popular because of the browser. It has a TON of syntactit niceties today. Most of the warts are no longer relevant (here's to a future "use stric
by hajile 5y ago
JS isn't just popular because of the browser.
It has a TON of syntactit niceties today. Most of the warts are no longer relevant (here's to a future "use strict 2" mode that eliminates the really bad type coercion bits).
It hits a very pragmatic center where you can do OOP, but top-level functions are also possible (looking at you Java).
JS also has good functions. Closures that don't require spelling everything out, first-class functions that can be passed around to other functions, anonymous functions, etc. Outside of currying, it has almost everything you'd want functions to have. That's something sorely missing in languages like Python (lambdas), Ruby (proc/lambda/block mess), PHP (no implicit closures), Java (no first-class functions), etc.