Since ChatGPT is great a translation, answering in different languages and explaining code, I guessed it must be a decent transpiler too. It did not disappoint. Granted this is a simple example, but this is great for learning or explaining a new language.