Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There is honestly not much to learn, and that might be part of the appeal. At its core, JS is a relatively simple dynamic language with a clean syntax. Despite the clean syntax there are quite a few quirks in how some of the internals work (sorting and pervasive string comparison and casting, equality operator, etc). The most interesting thing about it is probably the programming model of free-form objects and closures: rather than using classes, you could write functions that return free-form records containing functions (and getters) that close over the lexical scope of the function. This gives a kind of dynamic object construction flexibility without the additional boilerplate.

For the base language I recommend Dr. Axel Rauschmayer's books (https://exploringjs.com/) as they're kept very much up to date.

Where things get really interesting is TypeScript, which takes all of this dynamism and manages to model it with a type system that doesn't feel all that constraining. It also ameliorates most of the core language papercuts. I don't really have good recommendations for TypeScript for now, other than browsing typescript issues and pull requests for examples written by Anders Hejlsberg

You have to be very careful with the library and tooling ecosystem, however. There are a billion ways to do things, many of them incompatible with each other, and things break all the time. This includes major, popular libraries and frameworks with good looking documentation websites, so it can be difficult to pick something solid and stable. This is where most of the pain of using JS comes from.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: