I don’t really know many people who write directly into a js file. I see them using some middleware to convert (“compile”) to js.
Here is a pretty exhaustive list of converters.
The thing to take from this, is just like C#, VB.NET, and Java, have their ILs, now because JS is treated like an IL, we now have a new classification of portable languages, such as C++, while keeping our traditional languages, like Java and C#.