Compiles the language PCode into JS with some simple find/replace logic. START LOOP ... LOOP WHILE is not supported.
JS definitely isn't the best language for this (no good synchronous input options). I chose it so you can see everything in the browser.
Hit COMPILE to see a JS version of your PCode. At your own risk, you can press EVAL to compile to JS and run eval() on the result.