I don't want to be the one to point it out, but... this is completely unrelated to JavaScript.
I guess it is upvoted because it's Eric but... I mean, not JS at all in any way.
Just saying.
Except that for any deterministic-algorithm function (one which does not need LLM inference to produce its output), you can do:
MySudoLangProgram |> transpile(JavaScript)
Think of it as a new way to write JavaScript, leveraging infinite, referentially-omnipotent function inference.
And in fact, this is one of my primary use-cases for SudoLang - I guess I should have explicitly pointed that out in the article.