I don't know if its that surprising that js isn't more popular. Html5 hasn't been supported by browsers for nearly as long. I've done the Udacity html5 game course and worked with flash a bit, and the tooling for Flash makes it easier / faster to build apps/games.