But it's still an extra overhead that you need to first understand, instead of just writing a JS file with your code and then loading it.
If your js does no I/O at all, you can write pure js. But if you want to show some results, there is no way that you can do it without learning the relevant API to do that.