Show HN: JavaScript-Lua Polyglot (gist.github.com)

1 points by chirsz ↗ HN
I tried to search but not found how to write JavaScript-Lua polyglot, so I do it by myself.

If you know polyglot for other languages, please share them.

2 comments

[ 2.7 ms ] story [ 12.8 ms ] thread
I don't get what this is...
A script that can be run as JavaScript or Lua. When run as Lua, it outputs "lua". When run as JavaScript, it outputs "js".