Rock, Paper, Scissors, Lizard, Spock in JavaScript
Simplify result function with math. http://jsfiddle.net/afrievalt/qBbJn/ . this function will also work with options = [“cockroach”, “nuke”, “shoe”], (from that 70s show) or any odd length array like options = [“water”, “fire”, “paper”, “rock”, “tree”, “metal”, “mud”] //todo: throw error if any index = -1