Skip to main content
23 of 26
Obviously works in Resource
user avatar
user avatar

Polyglot of purely literal answers, 9 bytes

333111222

This is a community wiki post for collecting answers that are just a literal that the language in question prints out automatically. Because it's a community wiki, feel free to edit it to add more languages where it works.

This program works in:

  • PHP
  • HTML (arguably not a language)
  • Jelly (and M)
  • 7 (more interesting, because the program's interpreted as both data and code; the first 3 prints the data, the rest of the program is useless stack manpulation)
  • CJam
  • Japt
  • Carrot
  • R (the R display also outputs [1] as metadata)
  • RProgN
  • Actually (though it actually prints 2\n2\n2\n1\n1\n1\n3\n3\n3\n)
  • ///
  • Noodel
  • TI-Basic
  • SimpleTemplate
  • ReRegex
  • Husk
  • Resource (although this outputs the string reversed)

Ignoring the final newline, this is valid in quite a few more languages:

Most links go to Try It Online!

user62131