Below is a "Roguelike" game implemented in JavaScript. To see the source code, visit http://thiscouldbebetter.wordpress.com/2013/06/28/a-roguelike-game-in-javascript/.
It's not nearly finished yet. You can't equip things and you can't throw things. Most of the tools and magic items don't do anything, and the ones that do don't do the right thing. Monsters don't spawn in any consistent way. There's no real goal, and if you go deep enough the dungeon eventually just peters (or actually errors) out. Eventually the plan is to build a full NetHack clone, or at least something very similar, but who knows how realistic that is.