I'm trying to think of a metaphor to describe why I find javascript fascinating even though it is certainly the most carelessly structured environment I have ever struggled to put to work.
Computing evolves where programs are written for machines and machines are built to run programs. Year after year everything changes but "computing" as a whole keeps working.
Javascript is some sort of virus that has infected this system and taken hold to the point that it cannot now be removed.
If we compare the origin of computing to the origin of life then javascript might play a role like RNA where it is so successful that it will be everywhere forever. Federated wiki tries to rise above javascript just as DNA has risen above RNA but can't escape RNA for just about everything DNA wants to get done. Federated wiki needs javascript just like DNA needs RNA.
This alone makes javascript worthy of study but don't expect any consistency or order except that it survives.