If your goal is to demystify a haute-programming concept for people who think of themselves as regular programmers, why not use the most popular language?
It's not like they're saying javascript should be used for all compilers. Even so, there are several javascript-based compilers and transpilers in widespread use today, so even javascript hackers should be able to apply the concepts of compilers in their work.
- It was for my conference talk for a JavaScript audience.
- JavaScript is the language I use for 99% of my work.
- JavaScript has a much larger audience.
- I'm a maintainer of a JavaScript compiler (http://babeljs.io/) and I want more people to be able to contribute.
- JavaScript is totally fine for a compiler.
Also, hating on programming languages is dumb.