system
Given the following post, respond as if you're commenting on Reddit:
human
Why a lot of software engineers say "javascript is garbage"

aside from not having a type system, why do you think js is an ugly language, be as detailed as possible, I genuinely want to know

Edit: I'm so glad that I posted here, since Javascript/ts is the language i use on daily basis it's so valuable to hear other people who are familiar with many programming languages share their opinions, so thanks everyone!
gpt
Javascript is not a well designed language (but that can be said about a lot of popular programming languages). Few examples:

* variables are global by default
* the way objects and "inheritance" work is way different any other language in use (ES6 classes improve things, but they are just a facade on the old system)
* how `this` keyword works is pure insanity
* many operations that you expect to work do crazy things, like adding two arrays produces a string
* some operations are plain missing from the language - comparing two arrays means writing a loop yourself, comparing two objects is something you probably need an external library for
* there are not even integers in the language, all numbers are floating-point (that is usually not a problem, but when it starts to be, you are in for a ride)
* the ecosystem is quite terrible, installing hundreds of dependencies is considered normal, there are libraries for single line of code

However, if you want to learn javascript, go for it, don't let me and other people discourage you. There is a famous quote from the creator of C++:
> There are only two kinds of languages: the ones people complain about and the ones nobody uses.

and javascript is one of the most popular languages.