This is a very solid foundation to work with, for anyone who might have struggled with the contexts and how arrow functions, local variables, thises (hah) and prototypes fit into the bigger picture. It also clearly shows that Javascript is not the mess that it looks like from a beginner's perspective. Yes, anyone can create a 15-20 min video about how == and === can mess up stuff, how you cant just pass around a func…
I wonder why nobody has created a version of JavaScript that just throws exceptions for all the WTF cases? That is, it would basically be a mode like 'use strict-at-runtime'; . This would be incompatible, but it would be a useful development aid. Surely most frameworks like React and Angular avoid these corners of the language, and they could be trivially modified to run on such an interpreter? It would improve their…
Google experimented with something they called "strong mode". Classes were read-only, accessing nonexistent properties was an error, and things like that.
I liked it. Unfortunately, the experiment didn't go anywhere and strong mode was removed from Chrome.
Dart is somewhat similar, though. It got more straightforward semantics than JS and most of those WTF things are an error.