This is the robbers' thread, the cops' thread is here

A polyglot is a program, that without modification, can run in multiple languages.

Robbers' Challenge

First, find a vulnerable cop's answer, then try to find languages that the submission works in, if you found any that weren't listed by the cop, then you just cracked their answer. Post an answer linking to the original answer and what languages you found it working on (it must do the same thing on each language). You can then leave a comment on their answer linking back to your answer on this thread.


Most upvoted answer that actually does crack the cops' code wins


3 Answers 3


Foo, PotatoLatte's answer

puts "Hello World!"

Try it online!

Ah, the bane of cops and robbers, Foo.


Befunge-93, Shieru Asakotu's answer

'<?php '//'; #@ SPELL,WITH,ME, ,H,E,L,L,O, ,W,O,R,L,D,"'Hello, World!'"
$a = "'Hello, World!'";
if ([])
 console.log($a); //This should be an easy one to solve
else {
 for ($i = 1; $i < strlen($a) - 1; $i++)
// ?>'

Try it online!

Prints 'Hello, World!', quotes included.


Perl 6, Julia 0.4, R, etc., Cortex's answer

print("Hello, World!")# w|#(write-line "Hello, World!")

Try Perl online!

Try R online!

Try Julia 0.4 online!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.