What do you enjoy about JavaScript?
I don't find JavaScript fun to work with. I love Chromes debugging tools and realize it a hugely valuable language but I don't find it fun.
There are people that love JS and want to use it for everything. If you're one of them what makes it fun?
I like the syntax and the base concept, having a Lips like programming language with a C/Java like syntax was a good idea I think.
Having an asynchronous model but a with single thread is also something I like about javascript. It provides good enough performances for most use cases without requiring to think about synchronizing between threads. The async/await model is much simpler to use compared to Golang or Rust for example, while it is a lot less powerful of course. You can also use more than one process but it's usually a good sign that you should use something else than JavaScript for the task.
I also like the tooling, you have a lot of great things on npm. A lot of terrible things too and you shouldn't install whatever you find on npm. In general the community is very nice and JavaScript doesn't have a lot of enterprise crap with overly complicated design patterns.
It's of course not perfect, but I think it's one of the best programming languages at this time.
It’s a good balance. No compilation, but there are type checkers. Interpreted, but still pretty fast. Poor language design, but there are strict linters. Not pure functional but still takes inspiration from FP. In React land, declarative coding is the norm to the point where you can almost go too far with it. Straightforward to debug (no threading) and logging is straightforward.
I like I can build almost anything with it, from web applications to command line to desktop applications, to embedded scripts in almost any service.
I love it is asynchronous by default (and thus all its ecosystem is as well). As someone that had to deal a lot with thread pools, and semaphores and concurrency issues, this is invaluable to me.
I also like a lot the tooling. From VSCode support, to typescript, to eslint, prettier and despite people complain about large node_modules, I think NPM and the trade offs leading to that are very worth it.
I also really enjoy the availability of libraries... whatever you need, you'll find a popular package for it.
Create a single HTML file and inside that you can create a UI app that can easy communicate with thousands of different apis. Run in a local server and use it immediately without packaging or compiling it.
I like the way it's asynchronous first and everything revolves around the event loop. It makes responsive GUI's very easy to create.
Always thinking asynchronously means your less likely to create synchronous render-blocking code which sucks for users.
Also the npm ecosystem and tooling is very easy to work with and easy to understand (everything is under node_modules not some globally installed binary)
It's great for small projects and websites, but anything that requires performance would probably be better in a compiled language.
Ubiquitous. Front-end, back-end, embedded and there's a node wrap for everything.
(Old joke) The thing I most enjoy about javascript is closing the editor when I'm done.
Typescript seems like a genuine improvement but I am too lazy to learn it properly.
It probably has to do with if you like prototypical inheritance and it's asynchronous nature (I'm sure many other things too -- probably different for each person).
I love these and find them very powerful, but it's probably a bit like extroverts vs introverts -- totally dependent on your character.
It can be used to solve legitimate computational problems, whether you enjoy coding it or not.
I think JS is a versatile and good enough language for many tasks. I use node for my backend services since there are sdk for everything now and why spend a few days of effort when it can be done in minutes? And the effort spent in a few minutes can also scale if necessary so again not a huge concern. Love it!
It’s a great place to start for many tasks. When things get slow or it’s not the right tool for the task, then it’s time to switch that piece to Go or Rust.
It's a nice language for code golf. Hazardous features like implicit type coercion and assigning to undefined variables can really help a chef portion out unreadable spaghetti onto very small plates.
That it basically runs everywhere. It is one of the few languages that can even be considered if you're aiming to target mobile devices.
Why does any programming language have to be fun?
It's just a tool get something done. For me JS fails silently far too often and is burdened by DOM + CSS + frameworks with their own quirks.
JS is useful for some situations and the worst possible choice in others. That's why we have lots of PLs to chose from. Just like hardware stores don't just sell hammers.
It provides an adequate compilation target for Clojurescript..
In seriousness, I don't like working in it much either. I think it could be an ergonomic language if one had the luxury of green-field projects with disciplined style to navigate around foot guns and tedium, but... Hell is other peoples' code.
Unlike most other programming languages it is super easy to write hello world and proceed from there.
I like it because it's useful. It executes in a browser and manipulates the DOM. I don't think anything else can do that. Libraries like React allow me to reason about websites declaratively.
I enjoy the obfuscated ways that any JavaScript code can be entirely rewritten with using just 8 different characters.
http://www.jsfuck.com/
I stricly use JS client-side. I like that it is flexible and not strict. It does not judge. You can get really creative with it. And I like to work with Event Listeners :-)
Availability. Most anything else can be found implemented in other languages, but better and more concise. Nothing can beat having JS in all browsers, however.
I can run it in a browser. I can just open a browser on anyone's machine and we can start coding together.
I like TypeScript exclusively rather than JS, if that counts.
I'm not a big fan, but it is interesting/exciting/terrible/wonderful that you can use document.write as an lvalue, if you wanted to have it do something else.
falsy, truthy, undefined and null...
I enjoy the needless suffering it creates for developers who depend on it.