Write pseudocode in the console, press Convert, and pick Python or JavaScript to see the same program translated into it. The playground and every challenge that includes pseudocode offer this -- it reads the syntax tree the pseudocode parser already built and turns it into equivalent Python or JavaScript, statement by statement.

Your code Pseudocode
Output

Press Run to see what your code does.

Run that, then imagine pressing Convert to JavaScript -- the loop becomes a while loop, the comparison becomes a real less-than, and the variable declaration becomes let, because the converter already understands what every one of those pieces means. That's the part that only works because it starts from pseudocode: the parser built a real tree out of it, so every construct in the output is accounted for and the result can be run to check it.

It never runs the other way -- there is no Python-to-pseudocode or JavaScript-to-pseudocode button, and there isn't a quiet plan to add one soon. Reading Python or JavaScript back would need a real parser for each of those languages, and a partial parser is worse than none: it would mistranslate some inputs silently instead of failing loudly, which is a bad trade on a site whose whole purpose is teaching what code actually means. Converting only ever runs out of pseudocode, in one direction, because that's the direction where every step can be verified.

Everything above runs in this page, on your own machine. There is more of it on the practice pages.