Basic rock-paper-scissors game in javascript